Created
January 15, 2015 23:45
-
-
Save yusufhm/e80acc266ae1e33a05c2 to your computer and use it in GitHub Desktop.
Fix Drupal files permissions (credits to James Wilmot)
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 | |
# | |
# A script to fix file permissions in the given | |
# files directory for drupal | |
# | |
# Usage: | |
# - set files directory variable to point at the files | |
# drupal installation files directory | |
# - run script | |
files_dir="sites/default/files" | |
sudo chown -R :www-data $files_dir | |
chmod g+ws $files_dir | |
find $files_dir -type d -exec chmod g+ws {} \; | |
find $files_dir -type f -exec chmod 664 {} \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment