Date: Fri, 31 Jan 2003 20:30:41 +0100 From: Cliff Sarginson <cls@raggedclown.net> To: freebsd-questions@freebsd.org Subject: Re: restricting user's directory listing and changing Message-ID: <20030131193041.GB1019@raggedclown.net> In-Reply-To: <3E3ACC2D.5020506@potentialtech.com> References: <1044035168.3e3ab660cc8d5@horde-send.sendtech.net> <3E3ACC2D.5020506@potentialtech.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Jan 31, 2003 at 02:19:09PM -0500, Bill Moran wrote: > Jay Sern Liew wrote: > >Greetings. > > > > Basically, I have this group of users, that I give SSH/SFTP access, > > but I > >don't want them to be able to see the complete file hierarchy and ``cd'' to > >them. I just want a user to be able to access the user's home, and that's > >it > > Look at the docs on the chroot command, this is what you want (I think) > I'm not 100% sure how to make sshd do a chroot when you log in, but I'd > be real surprised if it's terribly difficult to do. > > >Has anyone wanted to do this before? > > Absolutely, this is very common. > > >I was thinking, or maybe I > >could redirect that group of users to use a different version of the > >command > >``cd'' and ``ls'' so that it will only work within their home directories. > > You could, but that's probably a more difficult solution. > WIth "cd" it's effectively impossible to write a replacement for it. It's builtin into the shell, any program/script that does a cd cannot affect the current directory that is the parent of that script. -- Regards Cliff Sarginson The Netherlands [ This mail has been checked as virus-free ] To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030131193041.GB1019>