syncthing user directory permissions

This commit is contained in:
Bob Mottram 2016-10-13 12:41:01 +01:00
parent 0c3d0f3c5b
commit 337252f25e
1 changed files with 8 additions and 0 deletions

View File

@ -275,6 +275,14 @@ function user_devices_changed {
fi
done < /home/$USERNAME/$SYNCTHING_USER_IDS_FILE
fi
# Permissions on user Sync directories
if [ -d /home/$USERNAME/Sync ]; then
chown $USERNAME:$USERNAME /home/$USERNAME /home/$USERNAME/Sync
fi
if [ -d /home/$USERNAME/SyncShared ]; then
chown $USERNAME:$USERNAME /home/$USERNAME /home/$USERNAME/SyncShared
fi
fi
done
}