情形一:
问题描述:搭建完成后,上传文件失败,并出现:200 PORT command successful. Consider using PASV. 553 Could not create file.
解决办法:
1)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_passive_mode off
httpd_enable_ftp_server off
tftp_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_passive_mode off
httpd_enable_ftp_server off
tftp_anon_write off
2)setsebool -P ftp_home_dir on
设置完成后,任然无法FTP文件
情形二:
1)setsebool -P ftpd_disable_trans 1
libsemanage.dbase_llist_set: record not found in the database (No such file or directory). libsemanage.dbase_llist_set: could not set record value (No such file or directory).
Could not change boolean ftpd_disable_trans Could not change policy booleans
2) /usr/sbin/setsebool -P ftp_home_dir 1
再试试,如果还是不行的话再使用下面完全方式:
[root@ linuxx vsftpd]# setsebool allow_ftpd_full_access 1
[root@ linuxx vsftpd]# setsebool allow_ftpd_use_cifs 1
[root@ linuxx vsftpd]# setsebool allow_ftpd_use_nfs 1
[root@ linuxx vsftpd]# setsebool -P ftp_home_dir 1
[root@ linuxx vsftpd]# setsebool httpd_enable_ftp_server 1
[root@ linuxx vsftpd]# setsebool tftp_anon_write 1
[root@ linuxx vsftpd]# service vsftpd restart
关闭 vsftpd:[确定] 为 vsftpd 启动 vsftpd:[确定]
[root@ linuxx vsftpd]# getsebool -a | grep ftp
搞定............................................................................