I have changed my DocumentRoot to
/home/user/www. To achieve that I have just changed the 2 occurrences of the path at /etc/apache2/sites-available/default.
The permissions of /home/user/www are 0774. I have added the www-data user to my user's group and the owner of
/home/user/www is my own user and group (user:user).
I have done that by:
sudo chmod -R 0774 www sudo chown -R user:user www sudo adduser www-data user
The problem is that Apache can't write to this directory. It can write only if I set www-data as owner, but if I do that, I can't write at the directory.
I have tested the permissions with:
sudo -u www-data ls /home/user/www sudo -u www-data cat /home/user/www/some-file
and it works.
But the Wordpress I have at
www can't delete or create files. Any ideas?