Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a folder:

/srv/ftp_folder

How would one go about setting up an FTP account with upload/download for that folder only with no other access?

share|improve this question
    
Is this to vague? –  Otoris May 12 '12 at 6:57
    
Yes, it is ;) What ftp server are you using? –  Rinzwind May 12 '12 at 20:13

1 Answer 1

up vote 2 down vote accepted

At first a warning: Be careful when using FTP, because neither authentication nor data transfer are encrypted.

This information is basically compiled from looking at the manpages and has not been tested, however it should work out that way.

$ man vsftpd.conf

Append the following lines to your vsftpd configuration:

chroot_local_user=NO
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd/chroot.list

Then add each user you want to lock to their homedir to the chroot.list file. You can change a users homedir by using

$ sudo usermod -d /path/to/homedir user

I hope this helps.

share|improve this answer
    
I was going to say chroot them into their home dirs, but you seem to have beaten me to it. I haven't tested it either but it sounds sane. –  gecko May 12 '12 at 20:33
    
I think this did help! But I ran into an issue where it is giving me this: 500 OOPS: cannot change directory:/srv/ftp_folder/ I also tried chown and chgrp on the ftp_folder but no luck. –  Otoris May 13 '12 at 7:22
    
At login time? Have you changed the users homedir to /srv/ftp_folder? Can you verifiy this in /etc/passwd? Have you restarted vsftpd after changing the homedir? –  mweinelt May 13 '12 at 7:28

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.