Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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