]> gitweb.fluxo.info Git - hydra.git/commitdiff
Fix trac permissions at backup-restore-site
authorSilvio Rhatto <rhatto@riseup.net>
Sat, 8 Mar 2014 21:32:14 +0000 (18:32 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sat, 8 Mar 2014 21:32:14 +0000 (18:32 -0300)
share/hydractl/backup-restore-site

index 3968b7f178180b815a068f01cb15aa658c96e21c..064e8e3966774bba5ea5e451a6a7a3327cd3f6c1 100755 (executable)
@@ -44,15 +44,19 @@ fi
 # Set site user.
 if hydra_check_user $SITE; then
   SITE_USER="$SITE"
+  TRAC_USER="$SITE"
 else
   SITE_USER="root"
+  TRAC_USER="www-data"
 fi
 
 # Set site group.
 if hydra_check_group $SITE; then
   SITE_GROUP="$SITE"
+  TRAC_GROUP="$SITE"
 else
   SITE_GROUP="root"
+  TRAC_GROUP="www-data"
 fi
 
 # Local backups are stored compressed
@@ -97,7 +101,8 @@ chown -R root.root $FOLDER
 
 # Trac
 if [ -e "$FOLDER/trac" ]; then
-  ( cd $FOLDER/trac && chown -R $SITE_USER.$SITE_GROUP attachments conf db auth plugins .egg-cache )
+  # Optionally also: gvcache/ log/
+  ( cd $FOLDER/trac && chown -R $TRAC_USER.$TRAC_GROUP attachments conf db auth plugins .egg-cache )
 fi
 
 # PmWiki