# Create user who can't list another directory



## Zonni (Aug 23, 2011)

Hi!
I've problem, I create user ( directory: /home/jamjam/ ) on my dedicated server but he can list and viev another directory ( /root, /home/documents ).

I realy don't want to user list another directory (he must viev /home/jamjam as he root directory)

I read handbook but i not got desired information.


How I do this?


----------



## SirDice (Aug 23, 2011)

Set the proper permissions on those directories.


----------



## fonz (Aug 23, 2011)

Zonni said:
			
		

> (he must viev /home/jamjam as he root directory)


See chroot(1) and/or jails.

Fonz


----------



## Alt (Aug 23, 2011)

Best way to restrict is chroot.

'Permissions' way:
For example you add user "jamjam" in group "users"
chmod/chown for

```
/root/  root: root 700
/home/  root:users 550
/home/jamjam/ jamjam:users 700
```
So users can use their homedir and cannot see others' home or root home


----------

