红联Linux门户
Linux帮助

500 OOPS: cannot change directory:/home/lubinsu的解决办法

发布时间:2016-03-07 09:46:59来源:linux网站作者:lubinsu

提示以下错误:
< 500 OOPS: cannot change directory:/home/lubinsu
< 500 OOPS: child died


这是权限配置的问题,首先我们先了解下什么是SElinux:
SELinux(Security-Enhanced Linux)  是美国国家安全局(NSA)对于强制访问控制的实现,是 Linux® 上最杰出的新安全子系统。NSA是在Linux社区的帮助下开发了一种访问控制体系,在这种访问控制体系的限制下,进程只能访问那些在他的任务中所需要文件。SELinux 默认安装在 Fedora 和 Red Hat Enterprise Linux 上,也可以作为其他发行版上容易安装的包得到。


首先查看FTP的SELinux状态:
[root@localhost vsftpd]# getsebool -a | grep ftp
allow_ftpd_anon_write --> off
allow_ftpd_full_access --> off
allow_ftpd_use_cifs --> off
allow_ftpd_use_nfs --> off
ftp_home_dir --> off
ftpd_disable_trans --> off
ftpd_is_daemon --> on
httpd_enable_ftp_server --> off
tftpd_disable_trans --> off


我们只需要把ftp_home_dir 或者 ftpd_disable_trans 设置为on即可:

[root@localhost vsftpd]# setsebool ftpd_disable_trans 1
[root@localhost vsftpd]# getsebool -a | grep ftp
allow_ftpd_anon_write --> off
allow_ftpd_full_access --> off
allow_ftpd_use_cifs --> off
allow_ftpd_use_nfs --> off
ftp_home_dir --> off
ftpd_disable_trans --> on
ftpd_is_daemon --> on
httpd_enable_ftp_server --> off
tftpd_disable_trans --> off


本文永久更新地址:http://www.linuxdiyf.com/linux/18673.html