Skip to content
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

In Ubuntu 22.04 start error,but Ubuntu 20.04 start is ok #373

Open
viseth opened this issue Jun 19, 2023 · 1 comment
Open

In Ubuntu 22.04 start error,but Ubuntu 20.04 start is ok #373

viseth opened this issue Jun 19, 2023 · 1 comment

Comments

@viseth
Copy link

viseth commented Jun 19, 2023

Hi,

Installation as service on Ubuntu 20.04 works perfectly but failed to start on Ubuntu 22.04. There's a weird permission issue.
No SElinux enforced...

viz@viz-virtual-machine:~/Desktop/test/webserver$ sudo systemctl status TestWebserver.service
● TestWebserver.service - The Webserver is the component that manages the whole infrastructure and data. Components (a.k.a. Servers), Monitors, Reports, Downtimes, Users are managed throu>
Loaded: loaded (/etc/systemd/system/TestWebserver.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Mon 2023-06-19 19:00:14 CEST; 17s ago
Process: 3458 ExecStart=/home/viz/Desktop/test/webserver/webserver (code=exited, status=203/EXEC)
Main PID: 3458 (code=exited, status=203/EXEC)
CPU: 4ms

juin 19 19:00:14 viz-virtual-machine systemd[1]: TestWebserver.service: Main process exited, code=exited, status=203/EXEC
juin 19 19:00:14 viz-virtual-machine systemd[1]: TestWebserver.service: Failed with result 'exit-code'.
viz@viz-virtual-machine:~/Desktop/test/webserver$ sudo tail /var/log/syslog
Jun 19 18:59:42 viz-virtual-machine gnome-shell[1194]: DING: Detected async api for thumbnails
Jun 19 18:59:42 viz-virtual-machine gnome-shell[1194]: DING: GNOME nautilus 42.6
Jun 19 19:00:07 viz-virtual-machine systemd[1]: fprintd.service: Deactivated successfully.
Jun 19 19:00:14 viz-virtual-machine systemd[1]: TestWebserver.service: Scheduled restart job, restart counter is at 59.
Jun 19 19:00:14 viz-virtual-machine systemd[1]: Stopped The Webserver is the component that manages the whole infrastructure and data. Components (a.k.a. Servers), Monitors, Reports, Downtimes, Users are managed through the Webserver WebUI. It bundles its own API interface that starts up at the same time as its webUI..
Jun 19 19:00:14 viz-virtual-machine systemd[1]: Started The Webserver is the component that manages the whole infrastructure and data. Components (a.k.a. Servers), Monitors, Reports, Downtimes, Users are managed through the Webserver WebUI. It bundles its own API interface that starts up at the same time as its webUI..
Jun 19 19:00:14 viz-virtual-machine systemd[3458]: TestWebserver.service: Failed to execute /home/viz/Desktop/test/webserver/webserver: Permission denied
Jun 19 19:00:14 viz-virtual-machine systemd[3458]: TestWebserver.service: Failed at step EXEC spawning /home/viz/Desktop/test/webserver/webserver: Permission denied
Jun 19 19:00:14 viz-virtual-machine systemd[1]: TestWebserver.service: Main process exited, code=exited, status=203/EXEC
Jun 19 19:00:14 viz-virtual-machine systemd[1]: TestWebserver.service: Failed with result 'exit-code'.

ANy workaround ?
Thanks

@jhalag
Copy link

jhalag commented Oct 2, 2023

From a quick google: https://serverfault.com/questions/957084/failed-at-step-exec-spawning-permission-denied

SELinux prevents you from running a system service where the binary is in a user's home directory [...]

To fix the problem, copy the binary to a proper directory such as /usr/local/bin and call it from there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants