System environment
ubuntu 14.04 LTS
vsftpd installation
apt-get install vsftpd
Profile
The default configuration file location is /etc/vsftpd.conf
local_enable=YES <span style="color: #008000">//</span><span style="color: #008000">开启本地系统账户登陆</span> write_enable=YES <span style="color: #008000">//</span><span style="color: #008000">当不能创建文件时候,打开这个</span> local_umask=022 <span style="color: #008000">//</span><span style="color: #008000">当上传的文件没有读权限的时候,打开这个</span> chroot_list_enable=YES <span style="color: #008000">//</span><span style="color: #008000">开启限制列表,这个是开关</span> chroot_list_file=/etc/vsftpd.chroot_list <span style="color: #008000">//</span><span style="color: #008000">限制名单列表,要限制的用户</span> local_root=/usr/local/htdocs //指定一个锁定的目录
FAQ
500 OOPS: vsftpd: refusing to run with writable root inside chroot
Solution: The set directory cannot have write permissions, set the permissions to 755