我爱小甜饼's profile见字如面BlogLists Tools Help

Blog


    March 27

    还好你们都还在

    最近这段时间心情很不好。不过看看大家的博客突然地又觉得很开心。每到一个地方都要踩两脚。就是开心。哈哈,不是灌水哟。
    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真是混帐,配置文件复杂也就算了,权限检查也这么婆妈。估计是早期版本安全问题一大堆给吓出来的毛病。