Created
July 5, 2019 20:07
-
-
Save pedrolaxe/ddd48abed3c55c50ff63e6bd948c68a8 to your computer and use it in GitHub Desktop.
Fix Permissions to /var/www/html/
This file contains 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
// Adding current user to www-data | |
sudo adduser $USER www-data | |
//change ownership to user:www-data and | |
sudo chown $USER:www-data -R /var/www/html | |
sudo chmod u=rwX,g=srX,o=rX -R /var/www/html | |
// change file permissions of existing files and folders to 755/644 | |
sudo find /var/www/html -type d -exec chmod g=rwxs "{}" \; | |
sudo find /var/www/html -type f -exec chmod g=rws "{}" \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment