Closed hegjon closed 2 years ago
Fixes #245
Thank you, @hegjon! If you can build the RPM, I can test it on my system, @prusnak .
Sounds fragile to maintain a list of the different paths for chmod/chown
Looks like I do not need full path for chmod/chown on my system.... not sure if it is because of newer systemd or some kind of whitelist?
But ExecStartPre will run as the trezord user.... might cause problems:
$ sudo chown root:root /var/log/trezord.log
$ sudo systemctl restart trezord.service
Job for trezord.service failed because the control process exited with error code.
See "systemctl status trezord.service" and "journalctl -xeu trezord.service" for details.
$ sudo systemctl status trezord.service
× trezord.service - Trezor Bridge
Loaded: loaded (/usr/lib/systemd/system/trezord.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Mon 2022-05-23 18:12:32 CEST; 9s ago
Process: 318199 ExecStartPre=touch /var/log/trezord.log (code=exited, status=1/FAILURE)
CPU: 4ms
May 23 18:12:32 fedora systemd[1]: Starting Trezor Bridge...
May 23 18:12:32 fedora touch[318199]: touch: cannot touch '/var/log/trezord.log': Permission denied
May 23 18:12:32 fedora systemd[1]: trezord.service: Control process exited, code=exited, status=1/FAILURE
May 23 18:12:32 fedora systemd[1]: trezord.service: Failed with result 'exit-code'.
May 23 18:12:32 fedora systemd[1]: Failed to start Trezor Bridge.
Closing for now, I were not able to find a non-hackish way to fix this issue
I have not tried to build the a new rpm/deb, but replacing the existing systemd init script and running
systemctl daemon-reload
on Fedora 35 works.Systemd init script requires full path to the executable, so it might break some special systems where the binaries are not in
/usr/bin
.Fedora 35: