Operating System - HP-UX
1748138 Members
3667 Online
108758 Solutions
New Discussion

Re: how to restrict a user to a specific directory?

 
dictum9
Super Advisor

how to restrict a user to a specific directory?

I want to create  a new user on a 11.31 system and give that user access to just one directory, is that possible?

 

1 REPLY 1
Steven Schweda
Honored Contributor

Re: how to restrict a user to a specific directory?

I've never done it, so I know nothing, but...

   The FTP server has a scheme for doing this to anonymous and guest
users using chroot.  It's easier there, because the FTP server needs
only a small subset of programs/libraries from the normal /usr/bin,
/usr/lib, and so on, so making private copies of them is not a big job.
For an otherwise normal user, who needs access to a full range of normal
programs, the job gets bigger.  Ignoring that, I'd try making the user's
default shell a script which does chroot and then runs a normal shell.

What does the special user need to do?  For a limited set of tasks,
it might be simpler to give him a default shell with limited
capabilities (instead of a normal shell), and not try to limit file
access in some other way.