LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   systemd failing "Operation not permitted" (https://www.linuxquestions.org/questions/linux-software-2/systemd-failing-operation-not-permitted-4175696854/)

Mike Davies 06-24-2021 10:22 AM

systemd failing "Operation not permitted"
 
Recently did an fresh install Fedora 34, and I'm trying to get the system working like it used to previously, but I have a problem with a systemd service.

I need to load a kernel module before starting a service.

Previously, the .service file simply had an extra line...

ExecStartPre=/sbin/modprobe ...

Now it fails with "operation not permitted".

It is all a bit annoying, because I can type in the command and start the service manually, but I'd rather have it running from the initial boot.

What is the secret ? I was under the impression that systemd ran as root and it could do anything.

Any help appreciated.

smallpond 06-24-2021 12:35 PM

To run an ExecStartPre command with full privileges. add "+"

Code:

ExecStartPre=+/sbin/modprobe ...
See: https://www.freedesktop.org/software...tml#ExecStart=

systemd is a great answer to a question that nobody asked.

Mike Davies 06-24-2021 12:42 PM

Thanks.

That worked perfectly.


All times are GMT -5. The time now is 11:10 AM.