LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Best way to implement ftp upload (https://www.linuxquestions.org/questions/linux-newbie-8/best-way-to-implement-ftp-upload-794601/)

vinaytp 03-10-2010 11:59 PM

Best way to implement ftp upload
 
Dear All,

I have followed following steps to implement, ftp upload by test1 user.

Code:

1. Add group ftp-users
# /usr/sbin/groupadd ftp-users

2. User test1 has been added to the group of ftp-users with /home/ftp-docs as home directory
# /usr/sbin/usermod -g ftp-users -d /home/ftp-docs  test1

3. Ownership and permission of /home/ftp-docs has been changed to provide read/write access to user test1 and group ftp-users
# chown test1.ftp-users /home/ftp-docs
# chmod 770 /home/ftp-docs

But My intention is for the user who login with test1 user privileges, he should not be able to browse any other direcoties say /, /var /etc etc.

Also he should not be able to change to any other directory.

How can I accomplish this ?

smoker 03-11-2010 05:31 AM

With vsftp you could create a chroot jail
http://ubuntuforums.org/showthread.php?t=837617

jamescondron 03-11-2010 05:37 AM

I suppose you could also just have the FTP daemon running as an FTP user (Which it ought to be doing anyway) which has a strict set of permissions stopping it from accessing these directories (Which it should be doing anyway)


All times are GMT -5. The time now is 03:10 PM.