# pure-pw Change user's directory



## jamiebond (May 28, 2014)

Hello,

My question relates to changing user johnsmith's ftp-root directory one level up using pure-ftpd with virtual users.

`pure-pw show johnsmith` gives me:

```
Login : johnsmith
Password: @gJL^878etc
UID: 2001 (ftpuser)
GID : 2001 (ftpgroup)
Directory: /var/www_1 <<<<<<<<
etc
```

I want to change the line:

```
Directory : /var/www_1
```
to

```
Directory: /var
```

How/Where do I change this?

Please help.
Kind regards,
Jamie


----------



## SirDice (May 28, 2014)

`pure-pw usermod johnsmith -d /var`

http://download.pureftpd.org/pub/pure-f ... tual-Users


----------



## jamiebond (May 29, 2014)

@SirDice, thank you. And also thanks for the link, where a quickly learned to do the `pure-pw mkdb` in order to commit the changes. (This is not a production server) -  So I, (johnsmith),  used the -D switch instead. I should have googled more. New to Linux. _[ FreeBSD is *not* Linux -- Mod. ]_

Just out of curiosity, does this mean that `pure-pw usermod johnsmith -d /` would give me FTP access to the _entire_ file/folder structure of the server_?_

Thanks again.

Jamie.


----------



## SirDice (May 30, 2014)

jamiebond said:
			
		

> Just out of curiosity, does this mean that `pure-pw usermod johnsmith -d /` would give me FTP access to the _entire_ file/folder structure of the server_?_


It sets the "home" directory of johnsmith to /. Any non-chrooted user will be able to browse the entire filesystem. Regardless of where the home directory is pointing at.


----------

