LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   FTP user restrictions (https://www.linuxquestions.org/questions/linux-server-73/ftp-user-restrictions-840713/)

coss_cat 10-27-2010 04:43 AM

FTP user restrictions
 
Hello everyone,

I got up and running a FTP server for which I use to access it a generic user "FTPuser". Of course this FTPuser can access his local home folder. What I want to do is to "force" this user to access an other folder where I have some files that I want to change.
I have read the vsftpd.conf man page and discovered that by editing the vsftpd.chroot_list file this goal can be achieved. The problem is that i haven't found a relevant link to how to do it.
For my example let's suppose that FTPuser wants to access /var/www. How do I do that? (I try to play a little with web pages) :D

PS: I use vsftpd as ftp server

feinbein 10-27-2010 04:52 AM

Best would be to setup the user with /var/www as home-directory and use
Quote:

chroot_local_user=YES
in vsftp.conf

Code:

useradd FTPUser -d /var/www -s /bin/false

coss_cat 10-27-2010 10:07 AM

Very good observation feinbein, but now I want to make available few directories for my FTPuser. Any idea? Thank you in advancce.

feinbein 10-27-2010 05:31 PM

You could try with symlinks or bind-mounts inside your ftp-home.

coss_cat 10-28-2010 04:50 PM

Thank you very much. I solved it out with symlinks:

ln -s /path_to_dir_that_I_want_access_to /path_desired_folder

And it stays after reboot

Again Thanks


All times are GMT -5. The time now is 04:08 PM.