Open clsty opened 10 months ago
Wondering why systemd doesn't do it already since we set StateDirectory and RuntimeDirectory.
Except in case of ConfigurationDirectory=, the innermost specified directories will be owned by the user and group specified in User= and Group=. If the specified directories already exist and their owning user or group do not match the configured ones, all files and directories below the specified directories as well as the directories themselves will have their file ownership recursively changed to match what is configured.
Same goes for capabilities:
AmbientCapabilities=CAP_NET_BIND_SERVICE CapabilityBoundingSet=CAP_NET_BIND_SERVICE
AmbientCapabilities was added in systemd v229. StateDirectory was added in systemd v211.
What is your distribution/systemd version?
systemd 250 (250-6.e19_0)
Is there anything in the system journal regarding maddy.service when you run systemctl daemon-reload
or on service start?
I wonder why directives in maddy.service are not applied.
I tried disable maddy.service and remove those permissions and enable again, this time the permissions are applied automatically just as you described.
However, this is not a fresh installation anymore. I can't tell why the first time it didn't work. My journalctl does not keep logs persistently.
Let me paste the log of the fresh installation (months ago) in .zsh_history
though.
NOTE: I use vifm (TUI filemanager) sometimes, so that not all paths of edited files nor the cp
s, mv
s were logged.
Maybe it's because of SELinux? I'm not familiar with this thing, but could it be possible that once I gave the permission manually, the restriction disappeared so that systemd could add it for me after that?
Add two lines of commands in Installation guide.
As for my test, it won't work without either of these lines.