I am trying to test how the BindPaths=
directive works on a Debian 8 system with systemd.
Currently I have a basic unit file for a service:
[Unit]
Description="Simple Test Service"
BindPaths=/path:/bindmount/path:norbind
[Service]
ExecStart=/usr/bin/long_running_program --flags
Restart=always
[Install]
WantedBy=multi-user.target
When I run findmnt
before and after starting the service I do not see the bind mount at /bindmount/path
listed at all.
When I ls
or ls -a
the bind mount location /bindmount/path
I do not see any files that are in /path
.
Why is this not working as expected?
I see in the systemd BindPath= man page it says:
This option is only available for system services and is not supported for services running in per-user instances of the service manager.
How do I know if I am running in a per-user instance of the service manager vs running a system service? Is it based on if my service is located in /etc/systemd/system
vs /lib/systemd/system
?