Possible Duplicate:
Linux Group Permissions

I have a file with following permissions

$ ls -l setup.txt
-rwxrwxr-x 1 www-data www-data 10741 2011-10-12 14:15 setup.txt

I belong to www-data group

$ groups `whoami`
auniyal : auniyal adm dialout cdrom audio www-data plugdev lpadmin admin sambashare vboxusers

So I was thinking I should be able to write to that file but I am not

$ test -w setup.txt && echo "Writable" || echo "Not Writable"
Not Writable

so how is it determined that file is writable or not, because my thinking was if file is group writable and I belong to that group I should be able to write to that file?

and in case it helps directory is also group writable

$ ls -l ..
...
drwxrwxr-x 10 www-data www-data    4096 2011-12-07 09:42 timesite
...
link|improve this question
1  
Did you recently add yourself to the www-data group? If so, have you logged out since? – Mat Dec 7 '11 at 16:37
@Mat yes that was it, you can put that as answer and I will select it, or I can close it as duplicate – Anurag Uniyal Dec 7 '11 at 16:38
feedback

closed as exact duplicate by grawity, surfasb, techie007, ChrisF, studiohack Dec 11 '11 at 15:47

This question covers exactly the same ground as earlier questions on this topic; its answers may be merged with another identical question. See the FAQ for guidance on how to improve it.

1 Answer

I needed to log-out and log-in again as I just added myself to www-data group

Linux Group Permissions

link|improve this answer
feedback

Not the answer you're looking for? Browse other questions tagged or ask your own question.