Solved

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

Posted on 2009-07-02
13
851 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

0
Comment
Question by:Sp0cky
  • 6
  • 6
13 Comments
 
LVL 29

Expert Comment

by:fosiul01
Comment Utility
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
 

Author Comment

by:Sp0cky
Comment Utility
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
 
LVL 29

Expert Comment

by:fosiul01
Comment Utility
what the permisson of mail folder ??

ls -l | grep mail
0
 

Author Comment

by:Sp0cky
Comment Utility
[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
 
LVL 29

Expert Comment

by:fosiul01
Comment Utility
hmmm
ok what about thsi command

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

see if it goes
0
 

Author Comment

by:Sp0cky
Comment Utility
[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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 29

Expert Comment

by:fosiul01
Comment Utility
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
 
LVL 8

Accepted Solution

by:
LunarNRG earned 200 total points
Comment Utility
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
 
LVL 29

Expert Comment

by:fosiul01
Comment Utility
hmmm @lunarNRG
you are right.
i didnot notice that bit ...

0
 

Author Comment

by:Sp0cky
Comment Utility
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
 

Author Comment

by:Sp0cky
Comment Utility
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
 
LVL 29

Assisted Solution

by:fosiul01
fosiul01 earned 50 total points
Comment Utility
@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
 

Author Closing Comment

by:Sp0cky
Comment Utility
Trouble-shooting the issue was part of the question so thanks to fosiul01 as well.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
The purpose of this article is to show how we can create Linux Mint virtual machine using Oracle Virtual Box. To install Linux Mint we have to download the ISO file from its website i.e. http://www.linuxmint.com. Once you open the link you will see …
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now