1 |
On 2021-09-30, Grant Edwards <grant.b.edwards@×××××.com> wrote: |
2 |
> On 2021-09-30, Grant Edwards <grant.b.edwards@×××××.com> wrote: |
3 |
> |
4 |
>> I'm trying to add NET_ADMIN capability to an executable that needs to |
5 |
>> create a tun inteface. AFACIT, this is the command to do that: |
6 |
>> |
7 |
>> $ sudo setcap cap_net_admin+ep example_app |
8 |
>> Failed to set capabilities on file `example_app' (Operation not supported) |
9 |
>> |
10 |
>> The only possible cause for that message Google has been able fo find |
11 |
>> is that the FS doesn't have xattr support. |
12 |
> |
13 |
> Is Posix ACL support required for setcap? |
14 |
> |
15 |
> I can't find any documentation of such a requirement, but it's the |
16 |
> only other thing I can think of... |
17 |
|
18 |
That's not it. I rebuilt my kernel with POSIX ACL support enabled for |
19 |
ext4, rebooted, and verified that ACLs now work. |
20 |
|
21 |
Still can't figure out how to get setcap to work |
22 |
|
23 |
# file example_app |
24 |
example_app: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, with debug_info, not stripped |
25 |
|
26 |
# setcap cap_net_admin,cap_net_raw+eip example_app |
27 |
Failed to set capabilities on file `example_app' (Operation not supported) |
28 |
|
29 |
-- |
30 |
Grant |