On Sat, 15 Aug 1998, Trevor Reynolds wrote:
> Date: Sat, 15 Aug 1998 10:08:28 -0400
> From: Trevor Reynolds <[EMAIL PROTECTED]>
> To: Linux-Config <[EMAIL PROTECTED]>
> Subject: Limiting users
>
> Hi, is there any way to limit what directories that a user has on a linux
> system, sort of like what gets done with anonymous ftp but I'd like to do it
> with telnet. Where the user logs in, but sees only his directories and sub
> directories...I'm not sure if this can be done, but I figured I'd ask
> anyway, Thanks in advance.
Quota support will do that. It will need to be compiled into the kernel
if not already. With quotas you can restrict the # of blocks with soft
and hard limits (blocks=1k blocks), and/or the # of inodes (file/directory
entries).
As far as restricting ability to see other directories, you can do that
with permissions. If this user is not the owner or group member of the
area you want to restrict, then change the "others" permissions, or the
last three of the ls -l output:
drwxr-xr-x 2 john customer 2048 Jan 25 1998 somedirectory/
If you change the last r-x to ---, then users who do not sign in as john
or are not members of customer group, will see the directory, but can't
get inside it. You need to be careful with some directories like etc,
bin, and others. Restricting some directories will prevent someone from
logging in, being able to ftp, and other nasty effects.