Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Did you create this file as root?
What are the permissions on this file?
Post the output of:
Code:
ls -l /path/to/postfixadmin.conf
where /path/to/ is the path to where the file is stored on your system.
It may be that the file is only readable by the root user. Can you open the file from a root terminal? Become root and run vim postfixadmin.conf in the directory where postfixadmin.conf resides, or use nano postfixadmin.conf as root and see if you can open it.
Are you able to open any other files with the extension .conf, either as root or as a regular user?
Post the location of your file and also the output of these commands:
Code:
ls -l yourFile.conf
whoami
as pointed out by the two guys above.
Remember that you need to be the owner of a file that you want to open or you must be a member of the group that the file belongs to. Otherwise, the third group called "others" should be given at least read permission to see the contents of the file.
Code:
chmod 666 fileName
would give read/write permissions to everybody. You can become the root by issuing the following command:
While opening with gedit command, it says "Could not open the file "/home/zahid/Desktop/postfixadmin.conf."
gedit has not been able to detect the character coding.
Please check that you are not trying to open a binary file.
Select a character coding from the menu and try again.
Showing option for character coding, retry and cancel button.
[root@localhost Desktop]# ls l /home/zahid/Desktop/postfixadmin.conf
ls: cannot access l: No such file or directory
/home/zahid/Desktop/postfixadmin.conf
[root@localhost Desktop]# service httpd restart
Stopping httpd: [FAILED]
Starting httpd: httpd: Syntax error on line 221 of /etc/httpd/conf/httpd.conf: Could not open configuration file /etc/httpd/conf.d/postfixadmin.conf: Permission denied
[FAILED]
[root@localhost Desktop]#
Apache should be able to read it. Can you compare it to another file in /etc/httpd/conf.d/ and set the permissions the same as that 'other' file (if necessary).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.