| 我爱小甜饼's profile见字如面BlogLists | Help |
|
March 14 删除以-开始的文件以下是在centOS 4.2上执行'rm --help'得到的帮助信息的一部分:
要删除第一个字符为‘-’的文件 (例如‘-foo’),请使用以下其中一种方法:
rm -- -foo rm ./-foo
请注意,如果使用 rm 来删除文件,通常仍可以将该文件恢复原状。如果想保证
该文件的内容无法还原,请考虑使用 shred。 March 01 sendmail因权限不合理拒绝启动的解决办法今天在asterisk@home系统的主机上安装邮件服务器。通过yum install装好sendmail和sendmail-cf这两个包后启动sendmail遭拒绝。
# service sendmail start
service sendmail start
Starting sendmail: 451 4.0.0 /etc/mail/sendmail.cf: line 91: fileclass: cannot open '/etc/mail/local-host-names': World writable directory 451 4.0.0 /etc/mail/sendmail.cf: line 588: fileclass: cannot open '/etc/mail/trusted-users': World writable directory [FAILED] Starting sm-client: /etc/mail/submit.cf: line 545: fileclass: cannot open '/etc/mail/trusted-users': World writable directory [FAILED] 经查实是与sendmail有关的文件权限设置有误,而非警告中提及的两个文件。解决办法有两种:
一为设置合理权限:
# chmod go-w / /etc /etc/mail /usr /var /var/spool /var/spool/mqueue
二为放松文件权限检查:
替换/etc/mail/sendmail.cf 中第91行
Fw/etc/mail/local-host-names 为
Fw-o /etc/mail/local-host-names
第588行
Ft/etc/mail/trusted-users
为
Ft-o /etc/mail/trusted-users
替换/etc/mail/submit.cf中第545行
Ft/etc/mail/trusted-users
为
Ft-o /etc/mail/trusted-users
即可顺利启动sendmail
按:sendmail真是混帐,配置文件复杂也就算了,权限检查也这么婆妈。估计是早期版本安全问题一大堆给吓出来的毛病。 |
|
|