The owner of the files does not have be
apache to work well. The requirement is that the
apache server which runs as
www-data must be able to read the files. Most systems default to allowing group read access, so having the group on the files be
www-data is sufficient.
apache server needs to be able to write dynamic content such as wikis, content upload directories, and caches. Otherwise it is more secure to prevent the
apache server from writing its content directories and files.
Consider changing the ownership to the user who needs to modify the content. Add them to the group
www-data. You could also set the group sticky bit on the /var/www directory. If you are the user you can execute these commands.
sudo chmod g+s /var/www
sudo usermod -aG www-data $LOGNAME
sudo chown -R $LOGNAME /var/www
Logout and login again to gain access to the www-data group. You will then be able to modify the content.