Linux Forums - Linux Help,Advice & support community:LinuxSolved.com

Network Troublshooting => Linux Servers Support => Topic started by: hhh123 on August 21, 2009, 01:47:50 PM

Title: Sendmail problem-cannot open '/etc/mail/trusted-users': Group writable directory
Post by: hhh123 on August 21, 2009, 01:47:50 PM
I have following problem related to sendmail.
If anybody have solution on this problem plz reply me on harshal.lakare@gmail.com
##########################################
Server OS : Red hat Enterprise Linux 5
sendmail packages : sendmail-8.13.8-2.el5.i386.rpm     
                           sendmail-8.13.8-2.el5.i386.rpm     
                           sendmail-devel-8.13.8-2.el5.i386.rpm
                           sendmail-cf-8.13.8-2.el5.i386.rpm
                           sendmail-doc-8.13.8-2.el5.i386.rpm
##########################################
[root@server ~]# service sendmail restart
Shutting down sm-client:                                   [FAILED]
Shutting down sendmail:                                    [FAILED]
Starting sendmail: /etc/mail/sendmail.cf: WARNING: dangerous write permissions
451 4.0.0 /etc/mail/sendmail.cf: line 91: fileclass: cannot open '/etc/mail/local-host-names': Group writable directory
451 4.0.0 /etc/mail/sendmail.cf: line 587: fileclass: cannot open '/etc/mail/trusted-users': Group writable directory
                                                           [FAILED]
Starting sm-client: /etc/mail/submit.cf: line 544: fileclass: cannot open '/etc/mail/trusted-users': Group writable directory
                                                           [FAILED]
[root@server ~]#
###################################################

Reply Me soon.


Regards
Harshal B Lakare
harshal.lakare@gmail.com
Title: Free linux Server
Post by: hhh123 on August 21, 2009, 01:52:34 PM
have following problem related to sendmail.
If anybody have solution on this problem plz reply me on harshal.lakare@gmail.com
##########################################
Server OS : Red hat Enterprise Linux 5
sendmail packages : sendmail-8.13.8-2.el5.i386.rpm     
                           sendmail-8.13.8-2.el5.i386.rpm     
                           sendmail-devel-8.13.8-2.el5.i386.rpm
                           sendmail-cf-8.13.8-2.el5.i386.rpm
                           sendmail-doc-8.13.8-2.el5.i386.rpm
##########################################
[root@server ~]# service sendmail restart
Shutting down sm-client:                                   [FAILED]
Shutting down sendmail:                                    [FAILED]
Starting sendmail: /etc/mail/sendmail.cf: WARNING: dangerous write permissions
451 4.0.0 /etc/mail/sendmail.cf: line 91: fileclass: cannot open '/etc/mail/local-host-names': Group writable directory
451 4.0.0 /etc/mail/sendmail.cf: line 587: fileclass: cannot open '/etc/mail/trusted-users': Group writable directory
                                                           [FAILED]
Starting sm-client: /etc/mail/submit.cf: line 544: fileclass: cannot open '/etc/mail/trusted-users': Group writable directory
                                                           [FAILED]
[root@server ~]#
###################################################

Reply Me soon.


Regards
BATMAN
Title: Re: Sendmail problem-cannot open '/etc/mail/trusted-users': Group writable directory
Post by: gauravbajaj on September 02, 2009, 05:07:41 AM
hmm it means that  you have the group writable permission to the dir which shouldn't have .

Like in my example sendmail was running fine
-bash-2.05b# service sendmail status
sendmail (pid 1338 1329) is running...

"/ "permission ( note that its not group pr world writable)

-bash-2.05b# ls -ld /
drwxr-xr-x  19 root root 4096 Sep  2 06:00 /

-bash-2.05b# service sendmail restart
Shutting down sendmail:                                    [  OK  ]
Shutting down sm-client:                                   [  OK  ]
Starting sendmail:                                         [  OK  ]
Starting sm-client:                                        [  OK  ]


Now I have given the / as writable permission

-bash-2.05b# chmod g+w /

-bash-2.05b# ls -ld /
drwxrwxr-x  19 root root 4096 Sep  2 06:00 /


-bash-2.05b# service sendmail restart
Shutting down sendmail:                                    [  OK  ]
Shutting down sm-client:                                   [  OK  ]
Starting sendmail: 451 4.0.0 /etc/mail/sendmail.cf: line 98: fileclass: cannot o                                                                             pen '/etc/mail/local-host-names': Group writable directory
451 4.0.0 /etc/mail/sendmail.cf: line 578: fileclass: cannot open '/etc/mail/tru                                                                             sted-users': Group writable directory
                                                           [FAILED]
Starting sm-client: /etc/mail/submit.cf: line 528: fileclass: cannot open '/etc/                                                                             mail/trusted-users': Group writable directory
                                                           [FAILED]
-bash-2.05b#


So the summary is this that you should not  have group or world writeable permission to below dir or files. It should be like below:

-bash-2.05b# ls -ld /
drwxr-xr-x  19 root root 4096 Sep  2 06:00 /

-bash-2.05b# ls -ld /etc
drwxr-xr-x  69 root root 8192 Sep  2 06:00 /etc
-bash-2.05b# ls -ld /etc/mail
drwxr-xr-x  2 root root 4096 Jul 22  2004 /etc/mail
-bash-2.05b# ls -lrt /etc/mail
total 176
-rw-r--r--  1 root root  5588 Apr 15  2004 helpfile
-rw-r--r--  1 root root     0 Apr 15  2004 virtusertable
-rw-r--r--  1 root root   127 Apr 15  2004 trusted-users
-rw-r--r--  1 root root   952 Apr 15  2004 submit.mc
-r--r--r--  1 root root 39181 Apr 15  2004 submit.cf
-rw-r--r--  1 root root  6097 Apr 15  2004 sendmail.mc
-rw-r--r--  1 root root    64 Apr 15  2004 local-host-names
-rw-r--r--  1 root root   920 Apr 15  2004 Makefile
-rw-r--r--  1 root root     0 Apr 15  2004 mailertable
-rw-r--r--  1 root root     0 Apr 15  2004 domaintable
-rw-r--r--  1 root root   331 Apr 15  2004 access
-rw-r--r--  1 root root 57677 Jul 22  2004 sendmail.cf
-rw-r-----  1 root root 12288 Jul 22  2004 virtusertable.db
-rw-r-----  1 root root 12288 Jul 22  2004 mailertable.db
-rw-r-----  1 root root 12288 Jul 22  2004 domaintable.db
-rw-r-----  1 root root 12288 Jul 22  2004 access.db
-bash-2.05b#

Check the same at your box