Skip to content

Instantly share code, notes, and snippets.

@rajibdpi
Forked from v1shwa/apache-permission.sh
Created September 22, 2024 18:36
Show Gist options
  • Save rajibdpi/a2e35b5131a20d932e728d8ca7b31758 to your computer and use it in GitHub Desktop.
Save rajibdpi/a2e35b5131a20d932e728d8ca7b31758 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}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment