Problem Running a Service

I am setting up a Fulcrum server of my Fedora Linux 37 (Workstation Edition) system.
I made a fulcrum.service file, enabled and started the service - unfortunately it will not run.
Could this be a permissions issue?

[g@fedora fulcrum]$ sudo systemctl enable fulcrum.service
Created symlink /etc/systemd/system/ → /etc/systemd/system/fulcrum.service.
[g@fedora fulcrum]$ sudo systemctl start fulcrum.service
[g@fedora fulcrum]$ sudo systemctl status fulcrum.service
× fulcrum.service - Fulcrum
     Loaded: loaded (/etc/systemd/system/fulcrum.service; enabled; preset: disabled)
     Active: failed (Result: exit-code) since Thu 2023-04-27 19:56:04 PDT; 28s ago
   Duration: 16ms
    Process: 15144 ExecStart=/home/g/fulcrum/Fulcrum /home/g/fulcrum/fulcrum.conf (code=exited, status=203/EXEC)
   Main PID: 15144 (code=exited, status=203/EXEC)
        CPU: 3ms

Try running the code as the service would from a terminal and look for errors.

Turn on the any debug/verbose options to see if that provides clues.

I assume this is code you wrote and can debug.

1 Like

The systemd.exec document has: “The actual process execution failed (specifically, the execve(2) system call). Most likely this is caused by a missing or non-accessible executable file.”. Normally, linux user directories get drwx------. permissions so you may want to choose a different location for your server.

1 Like

I did not write this…I wish!

Could you please tell me how to run this in Terminal?

I did try moving this to /usr/local/etc but when I went to enable service it gave me an error.
(I did rm the original service first following a guide)
Are we free to put a service file anywhere we choose?
If so, is there more that needs to be done for the service to be recognized?
Thank you.

Does this Fulcrum work when you run it from the terminal, as your user? Assuming the ExecStart line is correct, you would run this:

/home/g/fulcrum/Fulcrum /home/g/fulcrum/fulcrum.conf

Do you want the service to run it as your user, or as root?

Please post the full service file.

1 Like

Given it is installed in /home i assumed it was your code.
Where does the code come from?

Perhaps it needs to be a user service rather than a system service. That is, its service file goes into /etc/systemd/user.

1 Like

Fulcrum is from here:

I am following this tutorial…although he is on Ubuntu:

Service file:


ExecStart=/home/g/fulcrum/Fulcrum /home/g/fulcrum/fulcrum.conf


The Fulcrum executable is confirmed to be in /home/g/fulcrum
I am not sure how to run from Terminal, tried right clicking on Fulcrum in Files and choosing Run…then checked with:
journalctl -fu fulcrum.service
Result was same as in my original post.

Post 6 above by @jn64 gave the exact command line to use for testing the program in a terminal window. I will repeat that since it is what is shown in the ExecStart line above.
/home/g/fulcrum/Fulcrum /home/g/fulcrum/fulcrum.conf

Just to confirm this is not a permissions or an selinux issue. What are the permissions on /home, /home/g, /home/g/fulcrum, and /home/g/fulcrum/Fulcrum.?
The output of the commands
ls -ldZ /home
ls -ldZ /home/g
ls -ldZ /home/g/fulcrum
ls -ldZ /home/g/fulcrum/Fulcrum
will tell us that.

g@fedora ~]$ /home/g/fulcrum/Fulcrum /home/g/fulcrum/fulcrum.conf
/home/g/fulcrum/Fulcrum: error while loading shared libraries: cannot open shared object file: No such file or directory
[g@fedora ~]$ 
[g@fedora ~]$ ls -ldZ /home
drwxr-xr-x. 1 root root system_u:object_r:home_root_t:s0 2 Aug  9  2022 /home
[g@fedora ~]$
[g@fedora ~]$ ls -ldZ /home/g
drwx------. 1 g g unconfined_u:object_r:user_home_dir_t:s0 522 Apr 27 19:29 /home/g
[g@fedora ~]$
[g@fedora ~]$ ls -ldZ /home/g/fulcrum
drwxr-xr-x. 1 g g unconfined_u:object_r:user_home_t:s0 202 Apr 27 19:38 /home/g/fulcrum
[g@fedora ~]$
[g@fedora ~]$ ls -ldZ /home/g/fulcrum/Fulcrum
-rwxrwx--x. 1 g g unconfined_u:object_r:user_home_t:s0 17988488 Apr  9 09:31 /home/g/fulcrum/Fulcrum
[g@fedora ~]$ 

Can anyone please help me out with the latest requested outputs I posted?
Thank you.

This would be a problem for the service to use that file. NO ONE but the user ‘g’ can access anything under that directory.

Permissions would need to be at a minimum 705 (drwx---r-x) for the service to be functional.

dnf provides */* tells me that that file is provided when you install bzip2

Am I wrong in thinking that I need to be able to get Fulcrum to run first this way?

[g@fedora ~]$ cd fulcrum
[g@fedora fulcrum]$ ./Fulcrum -h
./Fulcrum: error while loading shared libraries: cannot open shared object file: No such file or directory

When I list installed I see:
But I do not see
Would it be in bzip2-libs.x86_64?

Thank you.

Not trying to be a pain in the ass but…
Could you please define:
“the service” …fulcrum.service?
“that file” …Fulcrum executable?

That seems a problem with Fulcrum not looking for the proper file from bzip2-libs

bzip2-libs-1.0.8-12.fc37.x86_64 : Libraries for applications using bzip2
Repo        : fedora
Matched from:
Filename    : /usr/lib64/
Filename    : /usr/lib64/

I suspect that if you were to create a link with the proper name it would work.

# ls -l /usr/lib64/libbz2*
lrwxrwxrwx. 1 root root    11 Jul 20  2022 /usr/lib64/ ->
lrwxrwxrwx. 1 root root    15 Jul 20  2022 /usr/lib64/ ->
-rwxr-xr-x. 1 root root 76912 Jul 20  2022 /usr/lib64/

I then created the link that is looked for by Fulcrum

# ln -s /usr/lib64/ /usr/lib64/

# ls -l /usr/lib64/libbz2*
lrwxrwxrwx. 1 root root    11 Jul 20  2022 /usr/lib64/ ->
lrwxrwxrwx. 1 root root    15 Jul 20  2022 /usr/lib64/ ->
lrwxrwxrwx. 1 root root    26 Apr 29 11:04 /usr/lib64/ -> /usr/lib64/
-rwxr-xr-x. 1 root root 76912 Jul 20  2022 /usr/lib64/

It should then work.
If Fulcrum only asked for or it should work as well with no kludge fixes.

I would file a bug report against Fulcrum (at the source) to get that fixed.

I can now start and run Fulcrum like this: (as recommended)

/home/g/fulcrum/Fulcrum /home/g/fulcrum/fulcrum.conf

I am still getting a permission error however when checking status of fulcrum.service.

May 01 08:45:34 fedora systemd[1]: Started fulcrum.service - Fulcrum.
May 01 08:45:34 fedora (Fulcrum)[25985]: fulcrum.service: Failed to locate executable /home/g/fulcrum/Fulcrum: Permission denied
May 01 08:45:34 fedora (Fulcrum)[25985]: fulcrum.service: Failed at step EXEC spawning /home/g/fulcrum/Fulcrum: Permission denied
May 01 08:45:34 fedora systemd[1]: fulcrum.service: Main process exited, code=exited, status=203/EXEC
May 01 08:45:34 fedora systemd[1]: fulcrum.service: Failed with result 'exit-code'.

Would I set permissions for the fulcrum folder that the Fulcrum executable is in or just for the Fulcrum executable?

EVERY directory in the path would need those permissions.
Note that my post said that the directory with the problem was /home/g.