Skip to content

Instantly share code, notes, and snippets.

@tebajanga
Last active June 2, 2020 19:56
Show Gist options
  • Save tebajanga/d88f11f119d64a1e7066e51921dcd1e1 to your computer and use it in GitHub Desktop.
Save tebajanga/d88f11f119d64a1e7066e51921dcd1e1 to your computer and use it in GitHub Desktop.
Adding permission to web folder in Ubuntu
sudo chgrp -R www-data /var/www/html/
sudo find /var/www/html/ -type d -exec chmod g+rx {}
sudo find /var/www/html/ -type d -exec chmod g+rx {} +
sudo find /var/www/html/ -type f -exec chmod g+r {} +
sudo chown -R $USER /var/www/html/
sudo find /var/www/html/ -type d -exec chmod g+s {} +
# Run these commands also, when above commands does not work
sudo usermod -a -G www-data $USER
sudo find /var/www/html/ -type d -exec chmod 775 {} \;
sudo find /var/www/html/ -type f -exec chmod 775 {} \;
@george1806
Copy link

works fine, thanks

@mocodertz
Copy link

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment