Skip to main content
added 56 characters in body
Source Link

What is actually happening is a security feature from systemd to prevent you from using setuid in services. If you add NoNewPrivileges=false to your service file it should work properly.

However, I cannot recommend you to use setuid as it is a major security flaw. Could

Could you not passput your service under root ?

It help avoid security flaw and even if you need to run some things in your script as a user, it is better to just switch user in a service run as root for these task rather than using the setuid. You can even remove your sudo rule in this case.

What is actually happening is a security feature from systemd to prevent you from using setuid in services. If you add NoNewPrivileges=false to your service file it should work properly.

However, I cannot recommend you to use setuid as it is a major security flaw. Could you not pass your service under root ?

It help avoid security flaw and even if you need to run some things in your script as a user, it is better to just switch user in a service run as root for these task rather than using the setuid.

What is actually happening is a security feature from systemd to prevent you from using setuid in services. If you add NoNewPrivileges=false to your service file it should work properly.

However, I cannot recommend you to use setuid as it is a major security flaw.

Could you not put your service under root ?

It help avoid security flaw and even if you need to run some things in your script as a user, it is better to just switch user in a service run as root for these task rather than using the setuid. You can even remove your sudo rule in this case.

Source Link

What is actually happening is a security feature from systemd to prevent you from using setuid in services. If you add NoNewPrivileges=false to your service file it should work properly.

However, I cannot recommend you to use setuid as it is a major security flaw. Could you not pass your service under root ?

It help avoid security flaw and even if you need to run some things in your script as a user, it is better to just switch user in a service run as root for these task rather than using the setuid.