Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to set up a separate user for each service I'm running on my Ubuntu box. For example, I'm running a Minecraft and Counter Strike server. I want those two to have the usernames css-server and minecraft-server and belong to the group game-servers. I can create users and add them to groups fine, but I also want them to have their own home directory to hold the files for each thing.

When I create the directory /home/css-server as root and then set it as the css-server user's login directory, that user has no permissions. I can't wget anything into the directory nor can I create subdirectories from css-server.

How do I set up directory permissions so that the users I create are able to do stuff in their own home directory?


share|improve this question
up vote 0 down vote accepted

If you didn't change the directory's owner/group/permissions after you created them with root, then only root will have access to them.

So, for the '/home/css-server' directory, do this as root:

chown css-server /home/css-server
chgrp game-servers /home/css-server

This will change the directory's owner to css-server and the directory's group to game-servers.

Then you should change the permissions as you see fit. Since css-server is now the owner of the folder, you should be able to change them as that user (or continue using root if you wish). Something like:

chmod 740 /home/css-server

A good reference on directory permissions is:

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .