How to have SFTP user path to be root?

Posted February 8, 2017 2.7k views
DigitalOceanUbuntu 16.04

I have added user with a command:

sudo adduser *user*

Now I can connect using FileZilla, however I have no clue what path does it brings me to.
I would like to be able to browse root of my server/site.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
3 answers


To define the users home path at creation, you’d use:

useradd -d /home/user user

To modify the user after creation, you’d want to use usermod from the CLI. The argument would be the same as it is for useradd, so you’d run:

usermod -d /home/user user

Where /home/user is the home path you want to assign to the user and user is the username of the user you want to create or modify.

Thanks for your reply. That worked!
If I may ask another question: Now I can’t manipulate with files in new directory.
Should I change permissions or something now?

Also, how do I make the path to be root of the server, not user root? /home takes to user root only.