Changing sftp user's home directory

Matt Graham danceswithcrows at usa.net
Tue Aug 17 13:23:57 MST 2010


> On Tue, Aug 17, 2010 at 12:58 PM, keith smith <klsmith2020 at yahoo.com>
wrote:
>> By default his home directory would be /home/billybob.  I need to
>> remove that and give him access to only one directory.
>> I only want billybob to have access to the directory documents.  I've
>> search google, however I am not finding the answer.

From: Eric Cope <eric.cope at gmail.com>
> Can you change the user's ssh home directory to the vhost's directory? SFTP
> uses SSH's home directory if I recall correctly...

What you're looking for is probably "chroot".  I've done this with sftp a long
time ago, but I had to patch sshd and recompile it since there was no support
for chrooting individual users within sshd back then.  There may be more
useful info if you google "chroot sftp" or "chroot sshd", since there's not
anything in the sshd man pages here.  Plus, I can't remember the exact stuff I
did since it was 7 years ago....

-- 
Matt G / Dances With Crows
The Crow202 Blog:  http://crow202.org/wordpress/
There is no Darkness in Eternity/But only Light too dim for us to see







More information about the PLUG-discuss mailing list