LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 02-20-2006, 02:56 PM   #1
turbo_acura
Member
 
Registered: Sep 2004
Location: London, UK
Posts: 95

Rep: Reputation: 15
world writable directory?


When I try to use the mail command, i get this error msg.

/etc/mail/submit.cf: line 545: fileclass: cannot open '/etc/mail/trusted-users': World writable directory

any ideas?
 
Old 02-20-2006, 03:12 PM   #2
satinet
Senior Member
 
Registered: Feb 2004
Location: England
Distribution: Slackware 11, Sabayon 3.1
Posts: 1,464

Rep: Reputation: 46
sounds like it is saying your permissions are too lax on that directory.

what is the output of:

ls -l /etc/mail/trusted-users ??

try "chmod 644 /etc/mail/trusted-users"

and see what happens.
 
Old 02-20-2006, 03:15 PM   #3
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
Check the permissions on the /etc/mail/ directory. It sounds like you have the "w" bit enabled for "others" and the program won't run because any user would be able to change the configuration files. Similarily, the ssh shell won't accept connections if the private keys are world readable. There is a similar situation if the apache configuration file is writable by the same user that apache runs at. It would allow hacker to change the config file, to run as root, which after apache starts would allow them root access and the ability to break out of the jail.

Last edited by jschiwal; 02-20-2006 at 07:15 PM.
 
Old 02-20-2006, 03:18 PM   #4
satinet
Senior Member
 
Registered: Feb 2004
Location: England
Distribution: Slackware 11, Sabayon 3.1
Posts: 1,464

Rep: Reputation: 46
yes,

note that some apps actually check that the permissions are strict enough, for security reasons, as described. you would think that it wouldnt matter, but you have to be careful with some apps. another example 'sudo'. /etc/sudoers has to be 'r--r-----' or it will throw it's toys out....
 
Old 02-20-2006, 03:56 PM   #5
turbo_acura
Member
 
Registered: Sep 2004
Location: London, UK
Posts: 95

Original Poster
Rep: Reputation: 15
I managed to fix it by 'chmod 644 /etc/'

thanks for all your help guys!
 
Old 02-20-2006, 04:45 PM   #6
satinet
Senior Member
 
Registered: Feb 2004
Location: England
Distribution: Slackware 11, Sabayon 3.1
Posts: 1,464

Rep: Reputation: 46
you shouldnt chmod the /etc directory to 644....
 
Old 02-20-2006, 07:14 PM   #7
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
chmod the /etc/mail directory to 0755. The x bit is needed on directories to be able to enter it.

I believe that the /etc/ directory should also be 755.
 
Old 02-21-2006, 03:56 AM   #8
satinet
Senior Member
 
Registered: Feb 2004
Location: England
Distribution: Slackware 11, Sabayon 3.1
Posts: 1,464

Rep: Reputation: 46
yeah, dont take the execute bit away from directories. maybe you need to find a howto on file permissions. :-)
 
Old 10-17-2009, 07:02 AM   #9
timdebrie
LQ Newbie
 
Registered: Oct 2009
Location: Haarlem, The Netherlands
Distribution: CentOS 5.3
Posts: 1

Rep: Reputation: 0
Lightbulb Solution for all Sendmail "World writable directory" error messages

Sendmail does a thorough check on write permissions on files and directories for Others (World), not only on the directory /etc/mail
And will not start if any of those write permissions are not to his liking.

You can overrule this check by changing the lines "Fw/etc/mail/..." to "Fw-o/etc/mail/..." in the files /etc/mail/sendmail.cf and /etc/mail/submit.cf
With these modifications, Sendmail will start, but with this "Fw-o" solution you're just overruling the permissions check, leaving the mail system insecure.

A better solution is to correct the permissions Sendmail is actually complaining about.
Correct the permissions with the following command:

chmod go-w / /etc /etc/mail /usr /var /var/spool /var/spool/mqueue

After submitting this command, Sendmail will start without any complaints about "World writable directory".

Last edited by timdebrie; 10-17-2009 at 08:27 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Security Warning: World Writable files found foxxer Linux - Security 7 06-04-2005 11:03 AM
Sendmail Group Writable Directory flipcode Linux - Security 0 12-23-2004 03:41 PM
sendmail world writable directory jbrearley Linux - Software 0 07-01-2004 12:16 PM
permissions question... can I make a directory writable from my user account hindenbergbaby Linux - Newbie 9 10-20-2003 04:42 PM
Writable HELP ME kill4surf Linux - General 1 02-16-2003 11:06 PM


All times are GMT -5. The time now is 01:11 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration