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

OK, so I am trying to figure out how to add a user to the "www-data" group. I also want to change the "sudo" group's permissions too (not user permissions, but permissions for the entire group!).

Can anybody help me with this before I follow a guide on the 'net and make a permissions error elsewhere on the system? (!)

What exactly does the output of id pi mean, i.e. "uid=/gid=/groups="?

uid=1000(pi) gid=1000(pi) groups=1000(pi),4(adm),20(dialout),24(cdrom),27(sudo),29(audio), 44(video),46(plugdev),60(games),100(users),105(netdev),999(input),1001(indiecity),1002(spiuser)

And what are secondary groups and how do you add them? I was under the impression that I had a group called www-data yet when I do just groups I get the following output that doesn't even list it:

pi adm dialout cdrom sudo audio video plugdev games users netdev input indiecity spiuser

Lastly, how do I change the permissions of a group (not a user within the group)?

share|improve this question
You don't want to follow "a guide on the 'net", but ask for one? We cannot do the very basic reading on that topic for you; fetch a book or whatever document you prefer on unix and read through it. Also, you're much to unspecific on what you want to do; and you're asking half a dozen questions in one question which probably better should have been split up as several independent ones. – Jens Erat Jun 28 '13 at 23:25
@JensErat: Yes. – I_lost_my_last_account Jun 29 '13 at 2:18
  • groups prints all groups your current user is in.
  • To add an user to a group in Debian based systems, use adduser username groupname, eg. adduser pi www-data.
  • For the output of id, read man id - in a very brief form it prints your user id and name, primary group id and name, and all other groups with id and name.
  • You can be in multiple groups, while one is your first group, all others are secondary.
  • You cannot assign permissions to a group, but you can set a file's group using chgrp and give the group permissions using chmod. For more details have a look at the man pages.
  • For information on how to configure the sudo group, have a look at /etc/sudoers and read the sudoers manual page.

It seems you want to administrate a web server. Right now you're lacking most basic unix knowledge, start learning about unix and linux in general before administrating production servers.

share|improve this answer

You must log in to answer this question.

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