New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bacula: fix for #89057 - systemd and bacula fight #106689
base: master
Are you sure you want to change the base?
Conversation
d39c4b2
to
9637b81
Compare
Success! |
(At some point in the future I intend to do a significant refactor of this module - but I wanted to just get it working first since it's been broken for a while) |
9637b81
to
eb6bfae
Compare
The application's hard-coded working directory was set to /var/lib/bacula. Thie directory is also used by systemd which changes the ownership of that direction to root meaning the application can't write to it. This fix provides an additional configuration option which allows our configuration to specify a new working directory. Added self to list of maintainers.
eb6bfae
to
f7cd2c0
Compare
Hi, the right way to fix this sort of problem is to set StateDirectory, which tells systemd to make a directory writable by the service. Did you try that? If you haven’t, there are lots of examples of other services that use it that you could look at to see how to do it. |
Ah, I’ve looked a bit closer. I think the real reason this wasn’t working is that User and Group aren’t set on the units, so systemd assumes the unit will be run by root. Could you try setting those to see if it helps? |
I have not tried that - let me investigate that and get back to you. Thank you for the feedback! |
@alyssais - I tried it, but bacula-fd needs to run as root. :-/ |
It might be possible to avoid that, but I haven't dug into this in any detail at all. |
After nuking my existing State I've found another bug in the module and package that needs to be fixed. Marking WIP again., |
@redvers What is the current state of your work? I'd be happy to have this done eventually. Let me know if I can be of any help. |
I marked this as stale due to inactivity. → More info |
The application's hard-coded working directory was set to /var/lib/bacula.
Thie directory is also used by systemd which changes the ownership
of that direction to root meaning the application can't write to it.
This fix provides an additional configuration option which allows our
configuration to specify a new working directory.
Motivation for this change
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)