Created
May 28, 2019 11:28
-
-
Save mthabsheer/6789851209119371a7a43e1ea8aeb4ab to your computer and use it in GitHub Desktop.
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
Allow Apache access to the folders and the files. | |
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 f -exec chmod g+r {} + | |
Give your owner read/write privileges to the folders and the files, and permit folder access to traverse the directory structure. | |
sudo chown -R USER /var/www/html/ | |
sudo find /var/www/html -type d -exec chmod u+rwx {} + | |
sudo find /var/www/html -type f -exec chmod u+rw {} + | |
(Optional) Make sure every new file after this is created with www-data as the 'access' user. | |
sudo find /var/www/html -type d -exec chmod g+s {} + | |
(Optional) Final security cleanup, if you don't want other users to be able to see the data | |
sudo chmod -R o-rwx /var/www/html/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment