linzebin

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

Ubuntu 12.04 64bit系统下安装的vsftpd,在登陆时提示500 OOPS: vsftpd: refusing to run with writable root inside chroot()。根本原因在于,从vsftpd_2.3.5版开始,取消了根目录的可写权限。因此,网上的普遍解决方案是以下两种:

方案一

$ chmod a-w /vaf/ftp

方案二

$ vim /etc/vsftpd.conf add the following

allow_writeable_chroot=YES

看起来,貌似第二种方式是更完美,但当我把allow_writeable_chroot=YES配置项加入的时候,重启vsftpd服务的时候发现不能正常工作了(21端口无程序在监听),于是上网查找解决方案,发现说法五花八门的,有人说配置项是allow_writable_chroot(少了个e),还有说配置项是allow_writable_root(少了ch)等的,经过我测试,发现全都不行。后来总算找到一个可行的方法。

Ubuntu 12.04 64bit的完整解决方案

$ apt-get install python-software-properties

$ sudo add-apt-repository ppa:thefrontiergroup/vsftpd

$ sudo apt-get update

$ sudo apt-get install vsftpd

$ vim /etc/vsftpd.conf and add the following

chroot_local_user=YES

allow_writeable_chroot=YES

$ sudo service vsftpd restart

posted on 2016-02-14 23:46  linzebin  阅读(909)  评论(0编辑  收藏  举报