Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

When setting up vsftpd I am trapped. When I leave the ftpuser's home directory without write permission I can login and all is fine despite the fact, that I cannot write (of course). When I add write permission I get something like

cannot change to directory with write permissions if user is chrooted

Then I added

allow_writeable_chroot=YES

to vsftpd.conf. But now I get

ECONNREFUSED - Connection refused by serverss

I am lost. What am I doing wrong?

Here ist my configuration:

ubuntu 12.04 - vsftpd 2.3.5 - etc/vsftpd.conf:

write_enable=YES
dirmessage_enable=YES
ftpd_banner="Welcome to my FTP service."
local_enable=YES
local_umask=022
chroot_local_user=YES
allow_writeable_chroot=YES
anonymous_enable=YES
anon_upload_enable=YES
anon_umask=022
anon_mkdir_write_enable=YES
anon_other_write_enable=YES
syslog_enable=YES
connect_from_port_20=YES
ascii_upload_enable=YES
ascii_download_enable=YES
pam_service_name=vsftpd
listen=YES
share|improve this question
    
That usually means that vsftpd is not running. Check for output when you try to start it, and messages in logfiles. –  mgorven Jun 16 '12 at 18:46
    
vsftpd on Ubuntu 12.04 does not have that allow_writeable_chroot option. What version of vsftpd are you running and on which OS? Please provide your entire configuration. –  mgorven Jun 16 '12 at 18:49
    
You both were right. I had a starting problem and now vsftpd sais: "500 OOPS: unrecognised variable in config file: allow_writeable_chroot". So, how can I chroot users in their home directory AND give them write permission? –  heinob Jun 17 '12 at 17:17
    
Please provide your entire configuration. –  mgorven Jun 17 '12 at 17:53
add comment

1 Answer

up vote 0 down vote accepted

I solved the problem by giving the user no write permission to his root directory but establishing subfolders with write permissions, so that he is still able to upload files. Not into the root, but into the subfolders. Not perfectly nice, but it works!

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.