View Single Post
  #13  
Old 28th February 2013, 20:32
Phonetic Phonetic is offline
Junior Member
 
Join Date: Feb 2013
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default 500 OOPS: vsftpd: refusing to run with writable root inside chroot()

Quote:
Originally Posted by gauravrishi View Post
I have configure Virtual Hosting With vsftpd And MySQL On Ubuntu 12.04 and everything is working. Follow all the steps. But when i connect FTP and enter the credentials then i show all the directory of different user. I want that only authoriszed user directory should show. I am not able to connect with FTP if i makr chroot_local_user=NO in /etc/vsftpd.conf other wise i show the error

Response: 220 (vsFTPd 2.3.5)
Command: USER testuser
Response: 331 Please specify the password.
Command: PASS ******
Response: 500 OOPS: vsftpd: refusing to run with writable root inside chroot()
Error: Critical error
Error: Could not connect to server
I followed this guide to get VSFTPD setup on an Ubuntu 12.04 server:
http://www.howtoforge.com/virtual-ho...n-ubuntu-12.04

I ran into a problem that many others are also running into. To get the error above "500 OOPS: vsftpd: refusing to run with writable root inside chroot()" fixed, here is what needs to be done:

Courtesy of Mark Hale from The Frontier Group:
Quote:
For those of you running Ubuntu 12.04, I have created a vsftpd 2.3.5 PPA that backports the allow_writeable_chroot config option from vsftpd 3 to the existing Ubuntu package. To use it:

sudo add-apt-repository ppa:thefrontiergroup/vsftpd
sudo apt-get update
sudo apt-get install vsftpd
reference: http://www.benscobie.com/fixing-500-.../#comment-4048

After doing the above, I then added this to my vsftpd config (/etc/vsftpd.conf):
Code:
allow_writeable_chroot=YES
Then I restarted the vsftpd service:
Code:
service vsftpd restart
And that fixed the error for me.

It seems like this should be added to the guide. The guide is great, but after following it exactly as it's written, I ran into the error above on Ubuntu 12.04. I haven't tried the guide on a different version of Ubuntu server so it may work just fine for some, but for 12.04, this was the missing step that solved my problem.
Reply With Quote