I'm getting this error when trying to start a custom systemd service.
netrender-slave.service: Failed at step EXEC spawning /usr/local/bin/netrender-slave.sh: Permission denied
Here's /etc/systemd/system/netrender-slave.service
[Unit]
Description=Blender netrender slave manager
[Service]
ExecStart=/usr/local/bin/netrender-slave.sh start
ExecStop=/usr/local/bin/netrender-slave.sh stop
ExecReload=/usr/local/bin/netrender-slave.sh reload
Type=simple
[Install]
WantedBy=multi-user.target
In this question, the problem was permissions on the script, but netrender-slave.sh
seems ok:
~# ls -al /usr/local/bin
total 16
drwxr-xr-x 2 root root 4096 Dec 4 11:30 .
drwxr-xr-x 10 root root 4096 Apr 20 2016 ..
-rwxr-xr-x 1 root root 816 Dec 4 11:30 netrender-slave.sh
In this question the problem was insufficient privileges in one of the directories, but all of /usr/local/bin
all appear similar to this:
drwxr-xr-x 2 root root 4096 Dec 4 11:30 .
drwxr-xr-x 10 root root 4096 Apr 20 2016 ..
...
However, in the comments of that same question this is offered:
the
ls
output did not show a trailing . after the UGO permissionsdrwxr-xr-x
- GNU ls uses a.
character to indicate a file with an SELinux security context, but no other alternate access method. A file with any other combination of alternate access methods is marked with a+
character.
I don't understand how to check if this is my problem.
/usr/local/bin/netrender-slave.sh start
if you run it manually? – thrig Dec 05 '17 at 01:01sh /usr/local/bin/netrender-slave.sh start
it works. But just/usr/local/bin/netrender-slave.sh start
gives:-bash: /usr/local/bin/netrender-slave.sh: /bin: bad interpreter: Permission denied
– 43Tesseracts Dec 05 '17 at 01:05