0

I am running an Ubuntu 11.10 x86 VPS. I have given a user sudo privileges, and for some reason I cannot recursively chmod /var/www/. I am running Nginx with php-fpm, although that shouldn't matter. Also running DenyHosts, which also shouldn't matter.

Here are the commands I run

sudo usermod -a -G www-data <my_user>
sudo chgrp -R www-data /var/www
sudo chmod -R g+w /var/www
sudo find /var/www -type d -exec chmod 2775 {} \;
sudo find /var/www -type f -exec chmod ug+rw {} \;

Commands source: How can I give write-access of a folder to all users in linux?

Another strange note is that if I login to root and run the same commands, it still won't recursively chmod. I can also chmod in my own home directory.

All suggestions would be appreciated.

austin@ubuntu:/var/www$ df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/simfs           157286400   2331852 154954548   2% /

austin@ubuntu:~$ stat /var/www
  File: '/var/www'
  Size: 4096        Blocks: 8          IO Block: 4096   directory
Device: b5h/181d    Inode: 22839436    Links: 4
Access: (2775/drwxrwsr-x)  Uid: (   33/www-data)   Gid: (   33/www-data)
Access: 2013-07-26 20:17:25.000000000 +0400
Modify: 2013-07-26 19:52:41.000000000 +0400
Change: 2013-07-26 20:17:19.000000000 +0400

The /var/www/ directory is setup like this:

/var/www/somewebsite.com/
/var/www/sub.somewebsite.com/

Austin K
  • 101

0 Answers0