今天安装vsftp服务器,在修改了 chroot_local_user 属性以后,发现进行客户端访问的时候会报错:500 OOPS: vsftpd: refusing to run with writable root inside chroot()
到网上查了资料,得到解决问题方法如下:
“如果启用chroot,必须保证ftp根目录不可写,这样对于ftp根直接为网站根目录的用户不方便,所以建议假如ftp根目录是/home/${cjh},则将访问权限改写如下
### 查看当前权限 [root@ip ~]$ ls -l drwxr-xr-x 2 uploads uploads 6 6月 28 10:35 uploads ### 修改访问权限 [root@ip ~]$ chmod a-w uploads ### 确认当前权限 [root@ip ~]$ ls -l dr-xr-xr-x 2 uploads uploads 6 6月 28 10:35 uploads ### FTP测试试登陆 Rockmbp:xyz.com rock$ ftp uploads@ec2~.us-west-1.compute.amazonaws.com Connected to ec2~.us-west-1.compute.amazonaws.com. 220 (vsFTPd 3.0.2) 331 Please specify the password. Password: 230 Login successful. Remote system type is UNIX. Using binary mode to transfer files. ftp> ### 可以了完成