My question is openned to other propositions too.

An install sequence puts a binary in the directories (say bin1 in PATH_TO_BIN1).

It configures a service in /etc/init.d

The service has to be started by another user than root (say user1).

How to set the rights properly to let user1 start the service which is supposed to run bin1?

My first approch was with Capabilities... but I'm really watching outside to see if I havn't missed something big.

setcap cap_net_bind_service+ep $PATH_TO_BIN1/bin1
  • @christopher I think I don't know what I'm doing... I set some rights on my bin1 AND I start the service using su -c "...init.d ... start" -l user1 What is the sudo approch in your mind? What is the proper way to install a service on a system, so that at every start, USER1 will be the owner? – Sandburg Feb 12 at 15:24
  • Like in that: wiki.apache.org/httpd/NonRootPortBinding – Sandburg Feb 12 at 15:31

Your Answer

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

Browse other questions tagged or ask your own question.