当前位置: 技术问答>linux和unix
ftp-500 OOPS:cannot change directory:/root
来源: 互联网 发布时间:2017-05-25
本文导语: 新手求助啊!!!! FTP登录报 ftp-500 OOPS:cannot change directory:/root 错误 查看资料是说selinux的设置问题: 以下是selinux状态: [root@tangmingpei vsftpd]# sestatus SELinux status: enabled SELinuxfs mount: ...
新手求助啊!!!!
FTP登录报 ftp-500 OOPS:cannot change directory:/root 错误
查看资料是说selinux的设置问题:
以下是selinux状态:
[root@tangmingpei vsftpd]# sestatus
SELinux status: enabled
SELinuxfs mount: /selinux
Current mode: enforcing
Mode from config file: enforcing
Policy version: 24
Policy from config file: targeted
[root@tangmingpei vsftpd]# sestatus -b | grep ftp //查看了所有的ftp都是 off状态
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_connect_db off
ftpd_use_fusefs off
ftpd_use_passive_mode off
httpd_enable_ftp_server off
tftp_anon_write off
tftp_use_cifs off
tftp_use_nfs off
//然后使用命令修改,但是就是死活修改不了,不知道什么问题,求大神帮忙哈!在此先谢了!!
[root@tangmingpei vsftpd]# setsebool -P ftp_home_dir on
[root@tangmingpei vsftpd]# sestatus -b | 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_connect_db off
ftpd_use_fusefs off
ftpd_use_passive_mode off
httpd_enable_ftp_server off
tftp_anon_write off
tftp_use_cifs off
tftp_use_nfs off
// setsebool 命令修改,就是死活修改不了,不知道什么问题,求大神帮忙哈!在此先谢了!!
FTP登录报 ftp-500 OOPS:cannot change directory:/root 错误
查看资料是说selinux的设置问题:
以下是selinux状态:
[root@tangmingpei vsftpd]# sestatus
SELinux status: enabled
SELinuxfs mount: /selinux
Current mode: enforcing
Mode from config file: enforcing
Policy version: 24
Policy from config file: targeted
[root@tangmingpei vsftpd]# sestatus -b | grep ftp //查看了所有的ftp都是 off状态
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_connect_db off
ftpd_use_fusefs off
ftpd_use_passive_mode off
httpd_enable_ftp_server off
tftp_anon_write off
tftp_use_cifs off
tftp_use_nfs off
//然后使用命令修改,但是就是死活修改不了,不知道什么问题,求大神帮忙哈!在此先谢了!!
[root@tangmingpei vsftpd]# setsebool -P ftp_home_dir on
[root@tangmingpei vsftpd]# sestatus -b | 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_connect_db off
ftpd_use_fusefs off
ftpd_use_passive_mode off
httpd_enable_ftp_server off
tftp_anon_write off
tftp_use_cifs off
tftp_use_nfs off
// setsebool 命令修改,就是死活修改不了,不知道什么问题,求大神帮忙哈!在此先谢了!!
|
try
setsebool -P ftp_home_dir=1
setsebool -P ftp_home_dir=1