Press "Enter" to skip to content

解决Ubuntu提示500 OOPS: vsftpd: refusing to run with writable root inside chroot()

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

5 Comments

  1. 向IT 2015-05-10

    谢谢你哥哥我搞了6个小时 终于在你的方法下搞定 我想操死网上那些误人子弟的逼货 乱写 吗的逼

  2. miqi 2015-06-03

    不错 确实可以解决

  3. Anonymous 2016-12-02

    谢谢

  4. lilei 2017-05-04

    解决了,谢谢了!
    应该就是属于版本的问题,然后限制了登录

  5. Anonymous 2018-02-09

    不错不错~

Leave a Reply to Anonymous Cancel reply

Your email address will not be published. Required fields are marked *