sftp - limit users

Johan Booysen johan at matrix-data.co.uk
Fri Nov 9 09:42:01 UTC 2007


Not sure of your exact requirements, but maybe this helps:
http://joedonner2001.wordpress.com/red-hat-el3/sftp-server-within-a-chro
ot-jail/

May be useful as starting point, as it shows how to chroot users into
their home directories, so they can't cd out, and so on.

You could probably set up users' "home directories" in /etc/passwd to
whatever directories they will need to access, e.g. 

username:x:570:570::/directory/whatever:/usr/bin/rssh

as opposed to:

username:x:570:570::/home/username:/usr/bin/rssh

That's what I would try.

-----Original Message-----
From: redhat-list-bounces at redhat.com
[mailto:redhat-list-bounces at redhat.com] On Behalf Of Davis, Jared Scott
Sent: 08 November 2007 22:12
To: General Red Hat Linux discussion list
Subject: sftp - limit users

Hi,

I have SFTP set up and users can log in, however, I need to limit 'cd',
and restrict users to certain directories.  The directory restriction
will be different for each user (they normally won't be using their home
dir).  As of right now the directory listing has them in their home dir
and they can cd to anywhere.  How do I do this?  rbash or chroot?  If
so, how do I use them?

 

Thanks,

 

jared davis.





More information about the redhat-list mailing list