On Sat, Mar 5, 2022 at 10:34 PM Roland <devzero at web.de> wrote:> > why no writing your own systemd service which does the > mounting and setting proper dependency, so it starts before rsyncd starts ?Thanks for the quick reply. The clients will use rsyncd via ssh, so there is no systemd service in play, and as I mentioned previously, the mounting paths are dynamically configured in another service, so I need to remount whenever the paths change if I mount them beforehand. With the "early exec" hook, I can avoid such remounting, but it's only doable with root... Regards, Glen
Glen Huang via rsync <rsync at lists.samba.org> wrote:> ... the mounting paths are dynamically configured in another > service, so I need to remount whenever the paths change > if I mount them beforehand.Could the remount be done in that other service?> With the "early exec" hook, I can avoid such remounting, > but it's only doable with root...General approach when only part of a job requires root: 1. Set the remount program permissions to -r-sr-xr-- root foo (i.e. setuid root, executable only by group foo). The program must be an executable binary, not a script. 2. Ensure that the service which will run the remounter -- and only that service -- runs as group "foo".