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

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

Sp0ckyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

fosiul01Commented:
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
0
Sp0ckyAuthor 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

0
fosiul01Commented:
what the permisson of mail folder ??

ls -l | grep mail
0
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

Sp0ckyAuthor 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 ~]#
0
fosiul01Commented:
hmmm
ok what about thsi command

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

see if it goes
0
Sp0ckyAuthor 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
0
fosiul01Commented:
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
0
LunarNRGCommented:
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?



[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 ..
...

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
fosiul01Commented:
hmmm @lunarNRG
you are right.
i didnot notice that bit ...

0
Sp0ckyAuthor 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.


0
Sp0ckyAuthor 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

0
fosiul01Commented:
@unarNRG, good job, you noticed the difference

about root not getting email, i guess you have change other permission aswell

such as /var/spool/mail/root

0
Sp0ckyAuthor Commented:
Trouble-shooting the issue was part of the question so thanks to fosiul01 as well.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Distributions

From novice to tech pro — start learning today.