LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   proftp chroot multiple users (https://www.linuxquestions.org/questions/linux-general-1/proftp-chroot-multiple-users-109816/)

waffe 10-29-2003 03:20 AM

proftp chroot multiple users
 
I thought this would be easy but I am having troubles making it happen. I had a single user chrooted like this:

<VirtualHost mydomian.com >
DefaultRoot /home/user1
</VirtualHost>

I now need to add a second user to the server tht is also chrootred. I assumed you would just add another VirtualHost Like:

<VirtualHost mydomian.com >
DefaultRoot /home/user1
</VirtualHost>

<VirtualHost mydomian.com >
DefaultRoot /home/user2
</VirtualHost>

This does not work right. If I ftp in as the first user I am taken to the first users chrooted folder. Now If I ftp in as the second user I am taken the first users folder. I have tried many combos of the above script but nothings works as I need it to. Does someone know how this is done?

Thanks

Mrcdm 11-01-2003 07:30 PM

waffe,

There's some lines in the /etc/proftpd.conf file as below
# Default root can be used to put users in a chroot environment.
# As an example if you have a user foo and you want to put foo in /home/foo
# chroot environment you would do this:
#
# DefaultRoot /home/foo foo
DefaultRoot ~

I have all users default root to their home directory but haven't tried for individual ones. I assume looking at above that each user can be configured for a different one, ie:
Defaultroot /home/jack jack
would change jacks root to /home/jack. You would just need to include another line for another user etc etc.

Can anyone confirm this is not what it indicates? Please let me know if I'm wrong.

waffe 11-01-2003 11:11 PM

This is how it is done, I was close...

<VirtualHost mydomian.com>
DefaultRoot /home/user1
DefaultRoot /home/user2
</VirtualHost>


All times are GMT -5. The time now is 07:20 AM.