0

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?

Thanks.

1 Answer 1

0

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: http://www.webmonkey.com/2010/02/modify_user_permissions/

You must log in to answer this question.

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