Question: I'm trying to give myself permissions to /var/www/ however for some reason I am unable to do so. Currently what I'm facing is this:

```
nick@server1:/var$ ls -l
drwxrwxr-x  5 root wwwusers  232 Mar 15 19:31 www
nick@server1:/var$ groups
nick wwwusers
nick@server1:/var$ mkdir www/trying
mkdir: cannot create directory `www/trying': Permission denied

```

I am running Ubuntu 10.04 LTS on a VPS and am used to running unix on my own machine so I may be doing something absolutely stupid, but I would like to be able to have the group *wwwusers* be able to write to *www*.

Answer: 
Check that you don't have extended attributes set on the www directory

`sudo lsattr /var`

check the output for www

`----i-------- /var/www`

if it contains an `i` then it is immutable and cannot be changed so you will have to remove it

`sudo chattr -i /var/www`

There may be other extended attributes set that may affect what you are doing so check out the [**chattr**](http://linux.die.net/man/1/chattr) man page.
1. disk full
2. lsattr (as mentioned above), then if it has an attr you gotta sudo to chattr it.
3. mount and look for option mounted "ro" for read - only. (live cd?)
4. is there something already there named trying? (a file or dir?)
5. is /var/www a MOUNT POINT? (is there a disk in there,not a dir?)
if so,then you might need
6. Most likely deal, you're default group is nick,not www,so can you make your
/etc/passwd entry to be the same groupnumber is www?
7. Unlikely, are ACLs in effect? Linux ACLs 
Aug 28, 2008 ... Linux supports POSIX ACLs in the stock 2.6 kernel. Linux implements ACLs based on two POSIX drafts -- 1003.1e and 1003.2c -- even though ...
<http://www.softpanorama.org/Commercial_linuxes/linux_acl.shtml>