Created
April 23, 2014 06:09
-
-
Save ssv445/11204300 to your computer and use it in GitHub Desktop.
Setup file permission in Joomla CMS
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
#!/bin/bash | |
pwd=${PWD} | |
[[ $pwd =~ ^/var/www* ]] || exit 0 | |
echo 'PWD is subdirectory of /var/www, applying permissions ...' | |
find . -exec chown www-data:www-data {} \; | |
find . -type f -exec chmod 644 {} \; | |
find . -type d -exec chmod 755 {} \; | |
#-- add up extra security after testing | |
#-- remove all groups/others permission | |
#sudo chmod -R go-rwx . | |
#-- permit only group to RW | |
#sudo chmod -R g+rw . | |
#-- other only can read | |
#sudo chmod -R o+r . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment