Setup file permission in Joomla CMS
#!/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