I'm really confused about this. I need to give a user read/write access to /var/www and followed the instructions in that question : Whats the simplest way to edit and add files to "/var/www"?. All commands were succesful, no error message.
However...
[solarbear@candyland ~]$ cd /var/www
[solarbear@candyland www]$ touch hello
touch: cannot touch `hello': Permission denied
Okay so perhaps I didn't add my user properly to the group, no biggie.
[solarbear@candyland var]$ sudo adduser solarbear www-data
The user `solarbear' is already a member of `www-data'.
Huh... so I'm part of the group... right?
[solarbear@candyland var]$ groups
solarbear adm cdrom sudo dip plugdev lpadmin sambashare
So I'm part of the group but it's not listed under the groups
command? How can that be?
As for /var/www, it seems to belong to the right group :
[solarbear@candyland var]$ ls -l /var
...
drwxrwxr-x 2 www-data www-data 4096 Jun 15 12:11 www
So 1) why is the www-data group not listed under groups
and 2) how can I get to write files in /var/www with using sudo
?