From 337252f25e15eea99d235081a3336d0dce10cf9c Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 13 Oct 2016 12:41:01 +0100 Subject: [PATCH] syncthing user directory permissions --- src/freedombone-syncthing | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/freedombone-syncthing b/src/freedombone-syncthing index 8e4f5ff2..9cc9b6a1 100755 --- a/src/freedombone-syncthing +++ b/src/freedombone-syncthing @@ -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 }