Better use ACL or Capability to let users start a service?
Clash Royale CLAN TAG#URR8PPP
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
services acl capabilities
add a comment |
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
services acl capabilities
@christopher I think I don't know what I'm doing... I set some rights on my bin1 AND I start the service usingsu -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
add a comment |
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
services acl capabilities
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
services acl capabilities
services acl capabilities
asked Feb 12 at 15:10
SandburgSandburg
8710
8710
@christopher I think I don't know what I'm doing... I set some rights on my bin1 AND I start the service usingsu -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
add a comment |
@christopher I think I don't know what I'm doing... I set some rights on my bin1 AND I start the service usingsu -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
@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
@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
Like in that: wiki.apache.org/httpd/NonRootPortBinding
– Sandburg
Feb 12 at 15:31
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f500194%2fbetter-use-acl-or-capability-to-let-users-start-a-service%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f500194%2fbetter-use-acl-or-capability-to-let-users-start-a-service%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
@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