I recently upgraded one of my Ubuntu servers, and I quickly found out that people who were trying to FTP couldn’t login. They got the following message: 500 OOPS: vsftpd: refusing to run with writable root inside chroot. Here is how to fix it.
This is a result of a security “feature” that has been added in the latest update, and released in the Ubuntu upgrade. The problem is that users’ root directory is writable, which isn’t allowed when using chroot restrictions in the new update.
Fortunately, the good folks at The Fronteer Group have backported vsftp until the full release of ver 3 of vsftp comes out. So here is what you do:
- login as root (or sudo..) and do the following:
- apt-get install python-software-properties
- sudo add-apt-repository ppa:thefrontiergroup/vsftpd
- sudo apt-get update
- sudo apt-get install vsftpd
- nano /etc/vsftpd.conf and add the following
- allow_writeable_chroot=YES
- sudo service vsftpd restart
Normally we all would just edit the /etc/vsftpd.conf file and be done with it. However, in the version of vsftp, this option dosen’t work. When version 3 of vsftp is included in the normal ubuntu server packaging, then all will be fixed. Until then, this workaround worked for me.
This article was originally posted on www.mikestechblog.com Any reproduction on any other site is prohibited and a violation of copyright laws.