为避免每次开机都要作这个操作,可在setsebool命令后面加上-P选项,使改动永久有效。

[root@localhost webserver]# 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 on
ftpd_connect_db off
ftpd_use_passive_mode off
httpd_enable_ftp_server off
tftp_anon_write off

需要设置allow_ftpd_full_access为on状态,

[root@localhost webserver]# setsebool allow_ftpd_full_access on

[root@localhost webserver]# sestatus -b| grep ftp
allow_ftpd_anon_write off
allow_ftpd_full_access on
allow_ftpd_use_cifs off
allow_ftpd_use_nfs off
ftp_home_dir on
ftpd_connect_db off
ftpd_use_passive_mode off
httpd_enable_ftp_server off
tftp_anon_write off

重新登陆ftp再来创建文件或目录,成功啦!

发表评论

电子邮件地址不会被公开。 必填项已用*标注