Skip to content

Instantly share code, notes, and snippets.

@jprieton
Created May 9, 2019 02:31
Show Gist options
  • Save jprieton/46d55414205342ba3c85c870851ff273 to your computer and use it in GitHub Desktop.
Save jprieton/46d55414205342ba3c85c870851ff273 to your computer and use it in GitHub Desktop.
Fix folder permission /var/www
# Add $USER to the www-data group
sudo usermod -a -G www-data $USER
# Change to group
sudo chgrp -R www-data /var/www/html
# Change propetary
sudo chown -R $USER:www-data /var/www/html/
# Update permissions
sudo find /var/www/html -type d -exec chmod ug+rw {} +
sudo find /var/www/html -type f -exec chmod ug+rw {} +
# Change to group
sudo chgrp -R www-data /var/www/html
# Change propetary
sudo chown -R www-data:www-data /var/www/html/
# Update permissions
sudo find /var/www/html -type d -exec chmod ug+rw {} +
sudo find /var/www/html -type f -exec chmod ug+rw {} +
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment