Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
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.
Hi friends,
My CentOS server cannot send email since I got this message in /var/log/maillog:
localhost sendmail[9135]: NOQUEUE: SYSERR(root): /etc/mail/submit.cf: line 544: fileclass: cannot open '/etc/mail/trusted-user' : World writable directory
I check the permission for all files in the mail folder, it shows:
-r-xr-xr-x 1 root root
Could you please help!
Thanks
Could you please let us know the permissions that are set on /etc/mail? Files under /etc/mail/ should have rw-r--r-- permissions set instead of -r-xr-xr-x
localhost sendmail[9135]: NOQUEUE: SYSERR(root): /etc/mail/submit.cf: line 544: fileclass: cannot open '/etc/mail/trusted-user' : World writable directory
Sendmail refuses to start if it finds a group/world writable directory in the directory tree /etc/mail. So run
Code:
ls -ld / /etc /etc/mail
and make sure all 3 directories above have the 755 permissions
Also as T3RM1NVT0R already mentioned, the files under /etc/mail must be 644 and owned by root
Thanks you very much for your quick help,
I run command ls -ld / /etc /etc/mail , and set all files under /etc/mail with permission: rwxr-xr-x, which is 755 permission.
but it still doesn't work.
Thanks
Hi bathory,
I am very new to Linux. I don't understand the command ls -ld / /etc /etc/mail , and also you said: "make sure all 3 directories have the 755 permissions", then "the files under /etc/mail must be 644 permission and owned by root".
I got confused.
Thanks
and also, when I run the command ls -ld / /etc/ /etc/mail, it shows:
drwxr-xr-x 24 root root 4096 Jan 31 11:31 /
drwxr-xr-x 85 root root 12288 Jan 31 12:37 /etc/
drwxr-xr-x 2 root root 4096 Jun 8 2011 /etc/mail
Thanks
bathory was trying to say that / directory /etc directory and /etc/mail directory should be owned by root and should have 755 permissions that is drwxr-xr-x. As I said files under /etc/mail should have 644 permissions set that is rw-r--r-- permissions set and all files should be owned by root.
and also, when I run the command ls -ld / /etc/ /etc/mail, it shows:
drwxr-xr-x 24 root root 4096 Jan 31 11:31 /
drwxr-xr-x 85 root root 12288 Jan 31 12:37 /etc/
drwxr-xr-x 2 root root 4096 Jun 8 2011 /etc/mail
Thanks
The directories permissions are correct, so it shouldn't complain about a world writable directory. What is the output of
Code:
ls -l /etc/mail
You can bypass this by uncommenting the line
Code:
#O DontBlameSendmail=safe
(remove the leading #)in both sendmail.cf and submit.cf, but it's not an elegant solution.
Last edited by bathory; 01-31-2012 at 03:06 PM.
Reason: Forgot the files need changes
After all resetting with file permissions, I have to restart the mail server.
I god i worked ... Great! great! great!
Thank you very much for your help: bathory and T3RM1NVT0R .
I will support this site with all my efforts.
best regards ...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.