Stronginthearm

Members
  • Posts

    5
  • Joined

  • Last visited

Posts posted by Stronginthearm

  1. I want to sync a folder which has the owner:group root:system and the permissions drwxrwxr-x (775).

    I've edited /lib/systemd/system/resilio-sync.service to run sync as user:group rslsync:system.

    I've edited /etc/passwd so tha the user rslsync has the group system.

    I've made a systemctl daemon-reload and a systemctl restart resilio-sync.

    Sync runs but won't write to the folder and says it has no permission.

    When I login as user rslsync I can obviously write to the folder because I have sufficient group permissions.

    Only when I change the owner of the folder to rslsync Sync can write to that folder.

     

    Ubuntu 18.04.2 LTS and Resilio Sync 2.6.3 installed with apt.

  2. Some more weird behaviour: I've created on each host a file with owner rslsync:staff and 664 permissions. On 3 hosts this doesn't sync and in the web interface I get the "locked files" error - Not enough permissions (lsof shows nothing). On another host all files sync.

    On the other hand, if I change the group permissions of the .sync folder from staff to rslsync everything works fine and if I sync to some new folder the group owner of everything is rslsync, so it seems Resilio Sync ignores the /etc/passwd, but other than the Yeasoft version of Bittorrent Sync there doesn't seem to be a possibility to change the group.

    And another step closer: after switching from systemd to sysvinit it works, but that can't really be the solution imho. Any systemd experts around...?

     

     

     

     

  3. 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?