3

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?

2
  • 3
    Have you tried to log out and then log in again? Afaik group information needs a relog to be updated.
    – soulsource
    Jun 15, 2013 at 16:47
  • Huh... you're right. I wasn't aware that I needed to log out first. Thank you so much!
    – SolarBear
    Jun 15, 2013 at 19:59

1 Answer 1

1

From comment above:

Have you tried to log out and then log in again? Afaik group information needs a relog to be updated. – soulsource Jun 15 at 16:47

You must log in to answer this question.

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