Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error message "500 OOPS: vsftpd: refusing to run with writable root inside chroot()" [closed]

Tags:

linux

ubuntu

ftp

I want to setup an anonymous only FTP server (able to upload files). Here is my configuration file:

listen=YES  anonymous_enable=YES anon_root=/var/www/ftp  local_enable=YES write_enable=YESr.  anon_upload_enable=YES anon_mkdir_write_enable=YES  xferlog_enable=YES connect_from_port_20=YES  chroot_local_user=YES  dirmessage_enable=YES use_localtime=YES secure_chroot_dir=/var/run/vsftpd/empty rsa_cert_file=/etc/ssl/private/vsftpd.pem pam_service_name=vsftpd 

But when I try to connect it:

kan@kan:~$ ftp yxxxng.bej Connected to yxxx. 220 (vsFTPd 2.3.5) Name (yxxxg.bej:kan): anonymous 331 Please specify the password. Password: 500 OOPS: vsftpd: refusing to run with writable root inside chroot() Login failed 

How can I fix this?

like image 710
WoooHaaaa Avatar asked Apr 19 '13 10:04

WoooHaaaa


People also ask

Where is Vsftpd default?

The default value is /etc/vsftpd. chroot_list. chroot_local_user — When enabled, local users are change-rooted to their home directories after logging in. The default value is NO.


1 Answers

This blog here points out how to fix this problem.

http://www.mikestechblog.com/joomla/operating-systems-section/operating-systems-ubuntu/155-500-oops-vsftpd-refusing-to-run-with-writable-root-inside-chroot.html

The issue being that the user's root directory is writable. The Frontier Group provides you with a fix on vsFTPd.

Here are the steps to be taken (copy paste from the tutorial, in case the link dies)

  1. login as root (or sudo..) and do the following:

  2. vi /etc/vsftpd.conf and add the following allow_writeable_chroot=YES

  3. sudo service vsftpd restart

like image 97
blo0p3r Avatar answered Sep 18 '22 16:09

blo0p3r