Sample Header Ad - 728x90

setcap binary but with arguments?

0 votes
1 answer
2904 views
I'm trying to start [BoringTun]() with setcap in order for it to run unprivileged but still have the ability to fmark:
root@67672793823c:/# setcap cap_net_admin+epi /usr/local/sbin/boringtun --foreground wgnet0
fatal error: Invalid argument
usage: setcap [-q] [-v] (-r|-|)  [ ... (-r|-|)  ]

 Note  must be a regular (non-symlink) file.
The man page doesn't seem very helpful and I can't find an option which will allow me to execute a binary with arbitrary arguments. If I remove the arguments, everything works, but I need to pass these arguments.
Asked by Naftuli Kay (41366 rep)
Apr 4, 2019, 09:36 PM
Last activity: Apr 5, 2019, 03:41 AM