this post was submitted on 04 Jul 2024
5 points (77.8% liked)
Linux Questions
4120 readers
19 users here now
Linux questions Rules (in addition of the Lemmy.zip rules)
- stay on topic
- be nice (no name calling)
- do not post long blocks of text such as logs
- do not delete your posts
- only post questions (no information posts)
Tips for giving and receiving help
- be as clear and specific
- say thank you if a solution works
- verify your solutions before posting them as facts.
Any rule violations will result in disciplinary actions
founded 3 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
If that is your full .service file you are missing the directive to tell the daemon what user to run under. Under service try adding
User=root
Group=root
Before the ExecStart command line.
Thanks, I verified that it's in the correct place. Still throwing a 126 (see the modifications in the edit).
Private Internet Access
Yep, more specifically I tried
sudo systemctl enable --now daemon.service. Gives the same error, and maybe that's because it's some kind of binary.sudo /bin/bash /path/to/daemonthrows the same error, butsudo /path/to/daemondoes not. However, if I drop ,/bin/bashfrom the service file, it throws a 203 error instead.Tried that, back to 203/Exec error. It's like ExecStart wants me to specify a program to launch it, and bash clearly isn't it.
Omg, adding
/usr/bin/envworked. Launched the daemon, and the client is able to launch and connect a WireGuard tunnel.systemctl show-environmentlists/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbinon the PATH, so maybe that's why that worked...? (I'm going to have to go read up onenv).Either way, I did a reboot to verify, and it's definitely running. Now I just need to tweak it a bit so it tries to reconnect if the network drops out, but holy shit, I appreciate the help.
Is that necessary for processes running as
root? AfaIk,rootis default.Keywords should be in CamelCase format, thus the space in
Wanted Byis wrong.Honestly can't believe I completely missed the space in Wanted By. This is likely the bigger culprit to the failed to run error. Poster above me is correct should read
WantedBy
It's an autocorrect typo. It's actually
WantedByin the file.Would have been nice if this would have been the error.
Foiled by autocorrect! There's no space in the original file, and I've edited my post to reflect that.
Does the command in
ExecStartwork in a root environment, e.g.sudo -i?I added the relevant user and group, and it's still throwing a 126. I checked the daemon itself, and it looks like it's a pre-compiled binary. Manually running
/bin/bash /path/to/daemongives the same error, butsudo /path/to/daemonstarts the daemon.