0

I have a systemd user service (not system service with a User=), But I need grant NET_ADMIN to this service, how to do it?

I can use fcap, but I'm trying to find another way.

Thanks.

4
  • I think you may be looking for the AmbientCapabilities option, describes in the Capabilities section of the systemd.exec man page. Commented Sep 12, 2024 at 21:24
  • @larsks But it only works for a system service, not user service. Commented Sep 12, 2024 at 22:26
  • Oh, sorry, I missed that the first time around. Commented Sep 12, 2024 at 23:29
  • 1
    User services can be defined by the user, so having a mechanism for adding capabilities the user does not have would be a security violation. The point of the service model is to have system services that can be activated from a user context. Commented Sep 13, 2024 at 3:02

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.