# scponly - restrict user to home directory



## fred974 (Apr 25, 2017)

Hi,

We use sftp in order to ftp to our wordpress application.
The way we do it is by creating user and set the shell to scponly. shells/scponly
I have noticed that the users that ftp to the site using WinSCP, are all able to navigate the file system. They are however not able to read the file...
Is there a way i can stop the user to navigate around the file system and restrict them to their /home/directory

Thank you


----------



## SirDice (Apr 25, 2017)

scponly(8):

```
+o	 chroot: scponly can chroot to the user's home directory (or any other
	 directory the user has	permissions for), disallowing access to	the
	 rest of the filesystem.
```


----------



## fred974 (Apr 25, 2017)

SirDice 
Thank you for pointing this out.
Now that the users are aready created, how can I modify them to add +o chroot?


----------



## SirDice (Apr 25, 2017)

> Set the default shell to the full pathname of your scponly binary. If you want chroot functionality, the name of the shell is "scponlyc", otherwise it is "scponly".


https://github.com/scponly/scponly/wiki/Install

You probably need to add various other things for the chroot(8) to work.


----------

