vsftpd chroot errors on Ubuntu
Beware this content is over 6 years old and considered stale. It may no longer be accurate and/or reflect the understanding of the author but remains here for reference only. Please keep this in mind as you use this content.
If you’ve been struggling to get vsftpd (2.3.5) on Ubuntu (12.04 - Precise) this is due to a security feature that prevents the chroot from being writeable.
This is a major problem if you have virtual users and your using PAM and MySQL to administrate FTP user accounts.
You might have spotted the message:
500 OOPS: vsftpd: refusing to run with writable root inside chroot()
It seems that beyond a new release of vsftpd, the only way is to force an install of either a backported copy of the application which means linking to a third-party repository or this code below which is from the debian.org servers (thanks to boxtricks.com).
The following snippet is for 64-bit Ubuntu servers only. You can find other versions here: http://ftp.debian.org/debian/pool/main/v/vsftpd/
Try that and let me know how you get on.