Link to home
Start Free TrialLog in
Avatar of waffe
waffeFlag for United States of America

asked on

Proftp - Chroot More Than One User

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 that 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
Avatar of paullamhkg
paullamhkg

have a look here http://www.tjw.org/chroot-login-HOWTO/ which will create a user and change root to the only directory you appointed to, and the new user can't access other place.
ASKER CERTIFIED SOLUTION
Avatar of brabard
brabard

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of waffe

ASKER

Thanks brabard,

your comment gave me this idea that solved the problem...

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