Skip to content

Instantly share code, notes, and snippets.

@McKabue
Forked from v1shwa/apache-permission.sh
Last active July 13, 2020 10:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save McKabue/5f479c7b06b5271bcff84ee6a1b92a11 to your computer and use it in GitHub Desktop.
Save McKabue/5f479c7b06b5271bcff84ee6a1b92a11 to your computer and use it in GitHub Desktop.
Ubuntu: Fix for Permissions denied on /var/www/html
# 1. Change owner of /var/www/html directory to apache user, here: www-data.
sudo chown -R www-data:www-data /var/www/html
# 2. Allow Group to edit.
sudo chmod -R 775 /var/www/html
# 3. Add yourself to apache group(www-data).
sudo usermod -a -G www-data ${USER}
# 4. Reboot to effect the permissions.
sudo reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment