Linux – “500 OOPS: vsftpd: refusing to run with writable root inside chroot()” – login failed on Debian

chrootdebian-wheezyftplinuxvsftpd

I installed vsFTPd for running an FTP server on Debian 7.3 (Wheezy). I checked the vsFTPd version was 2.3.5, and I configured it like so:

listen=YES
local_enable=YES
write_enable=YES
chroot_local_user=YES
pasv_min_port=15000
pasv_max_port=15200
allow_writeable_chroot=YES

I followed these articles for solving this problem:

And many others on Google and forums, but my problem was not solved.

NOTE: I have solved this problem on Ubuntu 12.04 (Precise Pangolin), but that solution does not work on Debian 7.3.

I really mixed up on it?!

Best Answer

I searched for it toooooooooo much, and I really mixed up, so I decided to change vsFTPd to SFTP or something else, till I found a link about this bug.

Then I found out this problem was solved in vsFTPd version 3. So I searched how to upgrade it and could find to add the jessie repository to my Debian 7.3 installation and upgrade it so:

echo "deb http://ftp.us.debian.org/debian jessie main contrib non-free" >> /etc/apt/sources.list
aptitude update
aptitude upgrade vsftpd
echo "allow_writeable_chroot=YES" >> /etc/vsftpd.conf
service vsftpd restart

Now it works correctly for me.