# ftp 192.168.1.31
Connected to 192.168.1.31.
220 (vsFTPd 3.0.2)
Name (192.168.1.31:root): test
331 Please specify the password.
Password:
500 OOPS: vsftpd: refusing to run with writable root inside chroot()
Login failed.
ftp> quit
421 Service not available, remote server has closed connection
To fix this error , do the following :-
1. Download the latest version of VSFTPD from the debian repository http://security.ubuntu.com/ubuntu/pool/main/v/vsftpd/ based on your operating system
$ sudo su –
Password:
# cd /usr/local/src
# wget http://security.ubuntu.com/ubuntu/pool/main/v/vsftpd/vsftpd_3.0.2-1ubuntu1.1_amd64.deb
# dpkg -i vsftpd_3.0.2-1ubuntu1.1_amd64.deb
2. After installation , uncomment following line on configuration file (/etc/vsftpd.conf)
chroot_local_user=YES
3. Then add following line
allow_writeable_chroot=YES
4. Restart VSFTPD service
# /etc/init.d/vsftpd restart
Done !!!
Great! It works for me on ubuntu 12.04 x86-64. Thank you.
Before this I tried to build vsftpd 3.0.2 from source but the option allow_writeable_chroot=YES doesn’t work where as vsftpd did not started.