About Users and Groups
I just got a Linode a couple weeks ago, and I am enjoying it, learning a lot of new stuff. I am pretty new to the whole server administration thingy even though I am (relatively) confortable with the Unix command line since I have used Ubuntu for a couple years and OS X for the past two years.
Anyway, here is my question: I am the only user using my linode, and I will (probably) always be. I don't want to keep using the root account, I want to create a new user for myself and add him to the sudoes. But I can google it to help me do that. What I am confused about is the following:
In which group should I put that group? I think I should probably add him to the admin group but should I also create a new group and put him in it too? How about the staff group? On my mac all my files/folders are assigned to the staff group by default…
I just tried to install DokuWiki. When I untared the archive, the new dir was assigned to the crontab group automatically (a bit odd if you ask me). So to what group should I assign Web apps/folders/files that I create?
6 Replies
To add it to sudo use the
visudo
command and add
bob ALL=(ALL) ALL
Under the bit where it says root.
As for dokuwiki you're opening a whole can-o-worms on what permissions and groups you should assign web stuff.
Personally I make a user for each of my sites and store the files in /home/
Some people prefer to store them in the /var/www folder, what you don't want to do is allow the files to be writable by the web server, so don't chown www-data or whatever your webserver runs as.
All my webapps are stored in /srv/www/{example.com}/publichtml/{hypotheticalsubdomainnotcounting_www}. What I will do is create a new user and assign the webapps to his group with the appropriate permissions (755 and 644).
Thanks a lot for your answer.
usermod -a -G admin bob
and you're all set.
At least, Ubuntu 8.04 does, not sure about later versions. If the line %admin ALL=(ALL) ALL* is in your /etc/sudoers then this applies to you too.
Anyway, thanks for the help