在服务器(centos5.5)上搭建了一个vsftpd,本地用户死活不能登录上去。各种排查,最后在/var/log/secure中发现错误:

pam_shells(vsftpd:auth): /etc/shells is either world writable or not a normal file

查看了/etc/shells,发现权限为777,感觉不对,然后看了另一台服务器该文件的权限为644,于是修改777为644后,vsftp就本地用户就可以登录了。

    至于为什么/etc/shells不能为777,我还没有找到具体原因,个人觉得应该是系统安全上的考虑,就像vsftp的匿名用户的家目录权限不能为777一样。