anonymous_enable=NO local_enable=YES write_enable=YES local_umask=777 #anon_upload_enable=YES #anon_mkdir_write_enable=YES dirmessage_enable=YES xferlog_enable=YES connect_from_port_20=YES #chown_uploads=YES #chown_username=whoever #xferlog_file=/var/log/vsftpd.log xferlog_std_format=YES #idle_session_timeout=600 #data_connection_timeout=120 #nopriv_user=ftpsecure async_abor_enable=YES ascii_upload_enable=YES ascii_download_enable=YES #ftpd_banner=Welcome to blah FTP service #deny_email_enable=YES #banned_email_file=/etc/vsftpd/banned_emails chroot_local_user=YES #chroot_list_enable=YES #chroot_list_file=/etc/vsftpd/chroot_list #ls_recurse_enable=YES? listen=YES #listen_ipv6=YES pam_service_name=vsftpd userlist_enable=YES tcp_wrappers=YES user_config_dir=/etc/vsftpd/userconfig allow_writeable_chroot=YES
注意开启:chroot_local_user=YES其它chroot都要注释
同时加上不同用户的配置文件路径:user_config_dir=...
[root@izbcadb]#mkdir userconfig [root@izbcadb]#cd userconfig [root@izbcadb]#nano ftpuser1
在用户配置文件ftpuser1填写指定的路径:
local_root=/usr/share/nginx/html/web/h5
其它用户ftpuser2,ftpuser3等加同样的路径即可
学习交流群:364976091