I chowned recusively /srv/site
to www-data:www-data
and chmodded it recursively with ug+rwx
. I then added myself to group www-data
.
$ sudo usermod -a -G www-data cyrus
$ sudo chgrp -R www-data /srv/site
$ sudo chmod -R ug+rwX /srv/site
However, why do I still get permission denied?
$ ls /srv/site
ls: cannot open directory /srv/site: Permission denied
$ cd /srv; ls -la
total 12
drwxr-xr-x 3 root root 4096 Aug 13 02:42 .
drwxr-xr-x 24 root root 4096 Aug 11 21:20 ..
drwxrwx--x 10 www-data www-data 4096 Aug 13 02:42 site