Create a user and restrict him to his home directory on Ubuntu 14.04

When you want to give someone an access to your website or server, you don’t want to give him your personal login credentials. The best way is to create a new user and restrict this new user to his own directory.

It is also useful if you want to host the website of a friend on your server, but you don’t want your friend to mess up with all your personal files. The easy solution : create him an account.

Open a terminal, login to your server via ssh and follow these steps:

Now you can upload the new website via sftp and give the user login credential to your friend.

Leave a comment