Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
...
share|improve this question

marked as duplicate by grawity, surfasb, Ƭᴇcʜιᴇ007, ChrisF, studiohack Dec 11 '11 at 15:47

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new 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

1 Answer 1

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

Linux Group Permissions

share|improve this answer

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