I am attempting to create a "Hello World" service, so to speak. It is called autologger.service and is store at /usr/lib/systemd/system/autologger.service.

I attempted sudo service autologger start, but systemctl returned the standard:

Job for autologger.service failed. See 'systemctl status
autologger.service' and 'journalctl -xn' for details.

When I checked /var/log/messages, I saw the following error message:

Failed at step EXEC spawning /opt/autologger/placeholder.sh: Permission denied

My question is: how do I give a service permissions to anything?

Here is the service unit file:

Description=Hello World
Before=shutdown.target reboot.target halt.target


placeholder.sh simply contains

echo "Hello World"

I forgot the fundamentals....

chmod +x placeholder.sh

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.