Created
March 27, 2014 22:28
-
-
Save valkum/9820479 to your computer and use it in GitHub Desktop.
Simple Workaround for aegir problem with wrong ownership of uploaded files, e.g. files in files/js/* with ownership www-data
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
#!/usr/bin/env bash | |
#Setup as a root cronjob | |
for f in /var/aegir/platforms/*/sites/*; | |
do | |
if [ -d "$f" ]; then | |
if [ -d "$f/files" ]; then | |
chown aegir:aegir "$f/files" -R | |
fi; | |
if [ -d "$f/privates" ]; then | |
chown aegir:aegir "$f/privates" -R | |
fi; | |
if [ -d "$f/themes" ]; then | |
chown aegir:aegir "$f/themes/*" -R > /dev/null 2>&1 | |
fi; | |
fi; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment