- [root@localhost]# cat vsftpd.conf |grep -v ^$ |grep -v "#"
- anonymous_enable=NO
- local_enable=YES
- write_enable=YES
- local_umask=022
- dirmessage_enable=YES
- xferlog_enable=YES
- connect_from_port_20=YES
- xferlog_std_format=YES
- chroot_list_enable=YES
- chroot_list_file=/etc/vsftpd/chroot_list
- listen=YES
- pam_service_name=vsftpd
- userlist_enable=YES
- userlist_deny=NO
- userlist_file=/etc/vsftpd/user_list
- tcp_wrappers=YES
安装vsftpd命令:yum install -y vsftpd db4-utils 。
[root@localhost ~]# setsebool ftpd_disable_trans 1
Could not change active booleans: Invalid boolean
又出现一个错误,我们将ftp_home_dir设置为on,重启vsftpd。
[root@localhost ~]# setsebool ftp_home_dir=1
[root@localhost ~]# service vsftpd restart
关闭 vsftpd:[确定]
为 vsftpd 启动 vsftpd:[确定]
[root@localhost ~]# 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