vsftpd: refusing to run with writable root inside chroot()

I have installed vsftpd on my Ubuntu 12.04 x32 I have set up vsftpd.conf and uncommented local_enable=YES and write_enable=YES and chroot_local_user=YES (both of them).

I had already installed apache server in /home/var/www/

so I did a chown root:root /var/www/

When I try to login with the root username and password to the ftp server. I get the error vsftpd: refusing to run with writable root inside chroot()

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

I’v added allow_writeable_chroot=YES to the end of the vsftp.conf file, located on /etc/

Since you’re chrooted to /home/snitz, move /var/www/* to /home/snitz/www/* so that you can edit the files.

The Ubuntu Server Guide suggests:<br /> <br><h3>Sharing Write Permission</h3> <br><blockquote>For more than one user to be able to write to the same directory it will be necessary to grant write permission to a group they share in common. The following example grants shared write permission to <b>/var/www</b> to the group <b>webmasters</b>.</blockquote> <br><pre>sudo chgrp -R webmasters /var/www <br>sudo find /var/www -type d -exec chmod g=rwxs “{}” ; <br>sudo find /var/www -type f -exec chmod g=rws “{}” ;</pre> <br><i>See</i> <a href=“”>HTTPD - Apache2 Web Server</a>.