Thursday, September 23, 2010

cannot open '/etc/mail/local-host-names': World writable directory

What is World-writable?
A world-writable file or directory is one that anyone can alter. For directories this means that files can be created or deleted within it by anyone. Being world-writable is almost always a security risk.

Get below error when try to start sendmail (/etc/init.d/sendmail start)
/etc/mail/ line 94: fileclass: cannot open '/etc/mail/local-host-names': World writable directory

  1. Grant w to /etc, /etc/mail, /etc/mail/* => not work
  2. Manually edit file
replace line Fw/etc/mail/local-host-names with line
Fw-o /etc/mail/local-host-names

identically (if you got the same error for trusted-users)
replace line Ft/etc/mail/trusted-users with line
Ft-o /etc/mail/trusted-users

1 comment:

  1. Thanks, this is really helpful.
    But what does the setting mean? Neither of my directories/files have flag 'w' for 'other'.