Created
August 18, 2016 02:52
-
-
Save scottalan/f71c4a2f644a572219487b92063f9ec5 to your computer and use it in GitHub Desktop.
Alias: Fix file permissions (Drupal)
This file contains hidden or 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
fixfiles() { | |
# Drupal root. | |
drupal=$(drush dd) | |
retval=$? | |
echo "${retval}" | |
if [ $? -eq 0 ]; then | |
echo OK | |
else | |
echo FAIL | |
fi | |
echo "${drupal}" | |
# Files directory. | |
file_dir="$drupal/sites/default/files"; | |
# Set permissions. | |
sudo find $file_dir -type d -exec chmod 775 {} +; | |
sudo find $file_dir -type f -exec chmod 664 {} +; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment