I'm upgrading my sync installations on my servers from the yeasoft version (btsync 2.0.95) to the new official Debian/Ubuntu version (rslsync 2.4.4) and I'm encountering some weird permission issues. On some of my servers sync seems to ignore group permissions.
Example: sync runs as user rslsync, group staff
rslsync:x:104:50::/var/lib/btsync:/bin/false
staff:x:50:
I try to sync the directory /etc/nagios/nrpe.d/
root@Siamorphe:~# ls -alh /etc/nagios
drwxr-xr-x 3 root root 4,0K Mär 11 15:10 .
drwxr-xr-x 99 root root 4,0K Mär 15 06:44 ..
-rw-r--r-- 1 root root 8,1K Jul 15 2014 nrpe.cfg
drwxrwxr-x 3 root staff 4,0K Mär 11 18:17 nrpe.d
-rw-r--r-- 1 root root 117 Jul 15 2014 nrpe_local.cfg
root@Siamorphe:~# ls -alh /etc/nagios/nrpe.d
drwxrwxr-x 3 root staff 4,0K Mär 11 18:17 .
drwxr-xr-x 3 root root 4,0K Mär 11 15:10 ..
-rw-r--r-- 1 rslsync staff 1,8K Mär 11 18:17 custom_checks.cfg
drwxr-xr-x 3 rslsync staff 4,0K Mär 15 06:42 .sync
On most hosts this works but on one it doesn't, I get "Don't have permissions to write to selected folder"
root@Sharess:~# ls -alh /etc/nagios
drwxrwxr-x 3 root staff 4,0K Mär 15 09:51 .
drwxrwxr-x 90 root staff 4,0K Mär 15 09:38 ..
-rw-r--r-- 1 root root 8,0K Mär 11 14:38 nrpe.cfg
drwxrwxr-x 2 root staff 4,0K Mär 15 09:51 nrpe.d
-rw-r--r-- 1 root root 117 Jul 15 2014 nrpe_local.cfg
root@Sharess:~# ls -alh /etc/nagios/nrpe.d
drwxrwxr-x 2 root staff 4,0K Mär 15 09:51 .
drwxrwxr-x 3 root staff 4,0K Mär 15 09:51 ..
If I change the login shell of the user rslsync to bash and manually try to write to this folder that works without problem (as it should, because of the group permissions).
The working servers are Ubuntu 16.04 or Debian 8, as is the broken one. The only apparent difference I see is the kernel:
broken: Linux Sharess 3.16.0-4-686-pae #1 SMP Debian 3.16.39-1+deb8u2 (2017-03-07) i686 GNU/Linux
works: Linux Deneir 3.16.0-4-586 #1 Debian 3.16.39-1+deb8u2 (2017-03-07) i686 GNU/Linux
works: Linux Siamorphe 3.16.0-4-amd64 #1 SMP Debian 3.16.39-1+deb8u2 (2017-03-07) x86_64 GNU/Linux
works: Linux Gond 4.4.0-66-generic #87-Ubuntu SMP Fri Mar 3 15:29:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Nevertheless, on one of the servers where this folder works (Gond), I get for some other previously working folders the don't have permissions error.
Somebody got any idea what could be the problem here?