Last active
September 8, 2017 11:51
-
-
Save DavMorr/5b435050faea108f76b7e1ac845c27e0 to your computer and use it in GitHub Desktop.
Set all directories to 755, and all files to 644
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
If you need a quick way to reset your public_html data to 755 for directories and 644 for files, then you can use something like this: | |
cd /path/to/sites/site/docroot | |
find . -type d -exec chmod 0755 {} \; | |
find . -type f -exec chmod 0644 {} \; | |
additionally, if you know php runs as the user and not as "apache", then you can set php files to 600, for an extra level of security, eg: | |
find . -type f -name '*.php' -exec chmod 600 {} \; | |
* Borrowed from: https://help.directadmin.com/item.php?id=589 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment