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
...
www-datagroup? If so, have you logged out since? – Mat Dec 7 '11 at 16:37