Created
February 11, 2014 02:34
-
-
Save kyleskrinak/8928288 to your computer and use it in GitHub Desktop.
A brutishly simple shell script that fixes drupal shared permissions (if you have shell access)
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 [ -d "$1/sites" ]; then | |
cur_dir=`pwd` | |
echo $cur_dir | |
cd $1 | |
echo `pwd` | |
echo "chmod directories" | |
find . -type d -exec chmod u=rwx,g=rx,o=rx {} \; | |
echo "chmod files" | |
find . -type f -exec chmod u=rw,g=r,o=r {} \; | |
echo "chmod sites/default/files" | |
chmod -R o+w sites/default/files | |
echo "chmod for bam" | |
chmod -R g+w sites/default/files/private/backup_migrate/ | |
cd $cur_dir | |
echo `pwd` | |
else | |
echo "give me a valid directory, man!" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment