Before I say anything, I know how permission for groups and users works.
My setup is:
a. my user is monkey
and is in the group www-data
groups monkey
monkey : monkey adm cdrom sudo dip www-data plugdev lpadmin sambashare
b. the root folder of apache is /home/monkey/var/www
and has the permissions 0775
with owner www-data
and group www-data
ls -la /home/monkey/var/www
total 8
drwxrwxr-x 2 www-data www-data 4096 Aug 12 10:37 .
drwxr-xr-x 3 root root 4096 Aug 12 10:37 ..
c. But I'm unable to write in /home/monkey/var/www/
monkey@ubuntu:~$ cp robots.txt var/www/robots.txt
cp: cannot create regular file âvar/www/robots.txtâ: Permission denied
The robots.txt
file was created under monkey
user.
What am I missing?