Last active
June 2, 2020 19:56
-
-
Save tebajanga/d88f11f119d64a1e7066e51921dcd1e1 to your computer and use it in GitHub Desktop.
Adding permission to web folder in Ubuntu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 {} \; |
After you add your username to the www-data
group, logout and login to for the changes to take effects.
works fine, thanks
thanks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can replace
$USER
with your username.