Skip to content

Instantly share code, notes, and snippets.

@valkum
Created March 27, 2014 22:28
Show Gist options
  • Save valkum/9820479 to your computer and use it in GitHub Desktop.
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
#!/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