RSYNCDIR=/vicepa/hcoop-backups/files
rm -fr $RSYNCDIR
mkdir -p $RSYNCDIR/$CURDATE
-chmod -R og= $RSYNCDIR
+chmod og=rx $RSYNCDIR
+chmod og= $RSYNCDIR/$CURDATE
# Initialize backup staging area
mkdir -p $BACKUPTMP
# Update file permissions so that rsync.net can access the backups
chmod -R go=,u-w $RSYNCDIR
-chmod u+w $RSYNCDIR
+chmod u+w $RSYNCDIR $RSYNCDIR/$CURDATE
chown -R rsync $RSYNCDIR/$CURDATE
# Complain to admins if there are unknown files