trying to run local hhd install for dev purposes, but systemd service is failing

Trying to run a custom systemd service for hhd so that i can do localhost dev work, and i can get the local install to work if i run hhd manually, but the systemd service itself fails. any ideas on where the problem is?
$ cat hhd_dev.service
[Unit]
Description=hhd service

[Service]
Type=simple
Nice = -15
Restart=always
RestartSec=5
WorkingDirectory=/var/home/deck/Development/hhd/venv/bin
ExecStart=/var/home/deck/Development/hhd/venv/bin/hhd --user deck

[Install]
WantedBy=default.target
$ cat hhd_dev.service
[Unit]
Description=hhd service

[Service]
Type=simple
Nice = -15
Restart=always
RestartSec=5
WorkingDirectory=/var/home/deck/Development/hhd/venv/bin
ExecStart=/var/home/deck/Development/hhd/venv/bin/hhd --user deck

[Install]
WantedBy=default.target
sudo systemctl status hhd_dev.service
● hhd_dev.service - hhd service
Loaded: loaded (/etc/systemd/system/hhd_dev.service; enabled; preset: disabled)
Drop-In: /usr/lib/systemd/system/service.d
└─10-timeout-abort.conf
Active: activating (auto-restart) (Result: exit-code) since Wed 2024-01-31 12:58:08 EST; 2s ago
Process: 41281 ExecStart=/var/home/deck/Development/hhd/venv/bin/hhd --user deck (code=exited, status=203/EXEC)
Main PID: 41281 (code=exited, status=203/EXEC)
CPU: 1ms
sudo systemctl status hhd_dev.service
● hhd_dev.service - hhd service
Loaded: loaded (/etc/systemd/system/hhd_dev.service; enabled; preset: disabled)
Drop-In: /usr/lib/systemd/system/service.d
└─10-timeout-abort.conf
Active: activating (auto-restart) (Result: exit-code) since Wed 2024-01-31 12:58:08 EST; 2s ago
Process: 41281 ExecStart=/var/home/deck/Development/hhd/venv/bin/hhd --user deck (code=exited, status=203/EXEC)
Main PID: 41281 (code=exited, status=203/EXEC)
CPU: 1ms
Solution:
chcon -u system_u -r object_r --type=bin_t path
Jump to solution
9 Replies
Kyle Gospo
Kyle Gospo9mo ago
could be selinux try sudo setenforce 0 if that fixes it, moving your executable to /usr/local/bin and making sure it's marked as executable w/ selinux labeling should be enough
Aru
Aru9mo ago
nice, that worked. sounds like I need to add it via rpm-ostree somehow then? since usroverlay isn't permanent
Kyle Gospo
Kyle Gospo9mo ago
Usr local is writeable
Aru
Aru9mo ago
oh ok, nice. i thought all of /usr wasn't writable and is marking it as executable with selinux just a chmod +x? or is there more to it?
Solution
Kyle Gospo
Kyle Gospo9mo ago
chcon -u system_u -r object_r --type=bin_t path
Kyle Gospo
Kyle Gospo9mo ago
I promise that works and isn't just something out of a Lovecraft book
Aru
Aru9mo ago
clearly not just a chmod +x then. thanks, i'll try it out and see if it works. i'm assuming the setenforce 0 doesn't persist across reboots feels awkward making a venv in /usr/bin/local, but I can confirm that it works. Thanks!
Kyle Gospo
Kyle Gospo9mo ago
~/.local/bin would work too fyi just need the same selinux command
Aru
Aru9mo ago
oh nice, that'd be much better. let me do that, thanks!
Want results from more Discord servers?
Add your server