Last active
July 1, 2020 12:40
-
-
Save mvidaldp/7dd903f36badd02d0278bf20511dfe5a to your computer and use it in GitHub Desktop.
How to correctly set permission to run Wordpress on NGINX
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
# by default NGINX runs the master process as root and worker processes as user http | |
sudo chown http:http /var/www/yoursitefolder -R | |
# set only the necessary permissions (0755 for folders and 0644 for files) | |
sudo find /var/www/yoursitefolder -type d -exec chmod 0755 {} \; # folders | |
sudo find /var/www/yoursitefolder -type f -exec chmod 0644 {} \; # files |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment