We help IT Professionals succeed at work.

Error using RHEL5 mail.. cant send mail.. cannot open '/etc/mail/trusted-users': Group writable

Sp0cky
Sp0cky asked
on
903 Views
Last Modified: 2013-12-06
This is a test box but I want to understand how to trouble-shoot this and find out what is causing it.  How do I diagnose the issue?  Have any of you experts seen this error before?  I am a newb and dont know anything about red hat email.  It appears something?  I dont know what.. can't open "/etc/mail/trusted-users" of which I have no idea what this directory or file does.  

Is this program called sendmail?  How do I know?
[root@101 Server]# mail
No mail for root
[root@101 Server]# mail root@192.168.0.101
Subject: Test
blahblahblah
Cc:
/etc/mail/submit.cf: line 544: fileclass: cannot open '/etc/mail/trusted-users': Group writable directory
[root@101 Server]#

Open in new window

Comment
Watch Question

Top Expert 2009

Commented:
you must of change the permission of that directory

check the permision of that folder
its should be like this

-rw-r--r-- 1 root root   127 Mar 15  2007 trusted-users

Author

Commented:
Here's what the entire directory looks like...
[root@101 Server]# ls -al /etc/mail
total 268
drwxr-xr-x  2 root root  4096 Jul  1 23:52 .
drwxrwsr-x 96 root root 12288 Jul  2 00:02 ..
-rw-r--r--  1 root root   355 Nov 28  2006 access
-rw-r--r--  1 root root 12288 Jun  4 10:07 access.db
-rw-r--r--  1 root root     0 Nov 28  2006 domaintable
-rw-r--r--  1 root root 12288 Jun  4 10:07 domaintable.db
-rw-r--r--  1 root root  5521 Nov 28  2006 helpfile
-rw-r--r--  1 root root    64 Nov 28  2006 local-host-names
-rw-r--r--  1 root root     0 Nov 28  2006 mailertable
-rw-r--r--  1 root root 12288 Jun  4 10:07 mailertable.db
-rw-r--r--  1 root root  1048 Nov 28  2006 Makefile
-rw-r--r--  1 root root 58205 Jun  4 10:07 sendmail.cf
-rw-r--r--  1 root root  7209 Nov 28  2006 sendmail.mc
-rw-r--r--  1 root root 41286 Nov 28  2006 submit.cf
-rw-r--r--  1 root root   940 Nov 28  2006 submit.mc
-rw-r--r--  1 root root   127 Nov 28  2006 trusted-users
-rw-r--r--  1 root root     0 Nov 28  2006 virtusertable
-rw-r--r--  1 root root 12288 Jun  4 10:07 virtusertable.db
[root@101 Server]#

Open in new window

Top Expert 2009

Commented:
what the permisson of mail folder ??

ls -l | grep mail

Author

Commented:
[root@101 ~]# ls -l | grep mail
-rw-r--r-- 1 root root     230 Jun 22 11:55 mail
-rw-r--r-- 1 root root     230 Jun 22 14:17 mailto:
-rw-r--r-- 1 root root     230 Jun 22 14:40 mailto:bob@xyz.com
[root@101 ~]#
Top Expert 2009

Commented:
hmmm
ok what about thsi command

cat /etc/hosts | mail -s "test" root

see if it goes

Author

Commented:
[root@101 ~]# cat /etc/hosts | mail -s "test" root
[root@101 ~]# /etc/mail/submit.cf: line 544: fileclass: cannot open '/etc/mail/trusted-users': Group writable directory
Top Expert 2009

Commented:
ok

in sendmail.cf

go to line number 589 , there woudl be a line

 Ft/etc/mail/trusted-users

tel me what is showing in your one
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Top Expert 2009

Commented:
hmmm @lunarNRG
you are right.
i didnot notice that bit ...

Author

Commented:
This is what "trusted users file looks like:

# trusted-users - users that can send mail as others without a warning
# apache, mailman, majordomo, uucp, are good candidates

This is what sendmail.cf line 589 looks like:
#####################
#   Trusted users   #
#####################

# this is equivalent to setting class "t"
Ft/etc/mail/trusted-users
Troot
Tdaemon
Tuucp

"Looks like /etc is group writable (and setgid), which is not the default in RHEL5. It should be "drwxr-xr-x", not "drwxrwsr-x". Did you change this for some reason?"

Yes, it may very well have been changed.  I will attempt to change this back.


Author

Commented:
Well, I think LunarNRG: solved the error issue.  The changed permissions are below.  The root is not getting the mail tho.  Kind of weird but another issue I guess.

[root@101 ~]# mail
No mail for root
[root@101 ~]#



[root@101 ~]# ls -al /etc/mail
total 312
drwxr-xr-x  2 root root  4096 Jul  2 01:09 .
drwxr-xr-x 96 root root 12288 Jul  2 00:28 ..
-rw-r--r--  1 root root   355 Nov 28  2006 access
-rw-r--r--  1 root root 12288 Jun  4 10:07 access.db
-rw-r--r--  1 root root     0 Nov 28  2006 domaintable
-rw-r--r--  1 root root 12288 Jun  4 10:07 domaintable.db
-rw-r--r--  1 root root  5521 Nov 28  2006 helpfile
-rw-r--r--  1 root root    64 Nov 28  2006 local-host-names
-rw-r--r--  1 root root     0 Nov 28  2006 mailertable
-rw-r--r--  1 root root 12288 Jun  4 10:07 mailertable.db
-rw-r--r--  1 root root  1048 Nov 28  2006 Makefile
-rw-r--r--  1 root root 58205 Jun  4 10:07 sendmail.cf
-rw-r--r--  1 root root  7209 Nov 28  2006 sendmail.mc
-rw-r--r--  1 root root 40237 Jul  2 00:28 submit.cf
-rw-r--r--  1 root root 41286 Nov 28  2006 submit.cf.bak
-rw-r--r--  1 root root   940 Nov 28  2006 submit.mc
-rw-r--r--  1 root root   127 Nov 28  2006 trusted-users
-rw-r--r--  1 root root     0 Nov 28  2006 virtusertable
-rw-r--r--  1 root root 12288 Jun  4 10:07 virtusertable.db
[root@101 ~]#

Open in new window

Top Expert 2009
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
Trouble-shooting the issue was part of the question so thanks to fosiul01 as well.
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.