How to give my user permission to add/edit files on local apache server? [duplicate]
Solution 1:
Edited this original post
Edit the following file as root: /etc/apache2/envvars
using the command:
sudo vim /etc/apache2/envvars
change the user and group to yourself if there is only one user and you will never have permissions problems again.
I.E., if you are only logging in and running the server as user 'logan':
export APACHE_RUN_USER=logan
export APACHE_RUN_GROUP=logan
Heck, for that matter you could change that user to the current user I'm sure somehow. Then, install user_dir you all have webs only you can have full control of (unless you modify this).
Restart the server
sudo /etc/init.d/apache2 restart
If you see:
- Restarting web server apache2 ... waiting /var/lock/apache2 already exists but is not a directory owned by user. Please fix manually. Aborting.
You can change the permission to the apache locks before restarting apache:
chown -R myuser:myuser /var/lock/apache2/
sudo service apache2 restart