Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs issue with setcap #61

Closed
lgadban opened this issue Jan 13, 2022 · 3 comments · Fixed by #64
Closed

Docs issue with setcap #61

lgadban opened this issue Jan 13, 2022 · 3 comments · Fixed by #64

Comments

@lgadban
Copy link
Collaborator

lgadban commented Jan 13, 2022

Version

n/a

Linux Version

Linux 5.4.0-1060-gcp #64~18.04.1-Ubuntu SMP Fri Jan 7 04:02:54 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Describe the bug

setcap on README doesn't work correctly

Steps to reproduce the bug

$ sudo setcap cap_sys_resource,cap_sys_admin,cap_bpf+eip $(which bee)
fatal error: Invalid argument
usage: setcap [-q] [-v] (-r|-|<caps>) <filename> [ ... (-r|-|<capsN>) <filenameN> ]

 Note <filename> must be a regular (non-symlink) file.

Expected Behavior

need to doc correct way to setcap on a default ubuntu 18.04 LTS (this example from GCP)

Additional Context

No response

@tnorlin
Copy link

tnorlin commented Jan 13, 2022

Terminal/shell issue? Enclosing in quotation marks (due to '+')? At least below works on Fedora 33 and Ubuntu 21.04

$ sudo setcap "cap_sys_resource,cap_sys_admin+eip" $(which bee)

@lgadban
Copy link
Collaborator Author

lgadban commented Jan 19, 2022

Unfortunately that doesn't seem to be the problem on the machine I was testing on:

$ sudo setcap "cap_sys_resource,cap_sys_admin,cap_bpf+eip" ~/.bumblebee/bin/bee
fatal error: Invalid argument
usage: setcap [-q] [-v] (-r|-|<caps>) <filename> [ ... (-r|-|<capsN>) <filenameN> ]

 Note <filename> must be a regular (non-symlink) file.
$ sudo setcap "cap_sys_resource,cap_sys_admin,cap_bpf+eip" $(which bee)
fatal error: Invalid argument
usage: setcap [-q] [-v] (-r|-|<caps>) <filename> [ ... (-r|-|<capsN>) <filenameN> ]

 Note <filename> must be a regular (non-symlink) file.

@lgadban
Copy link
Collaborator Author

lgadban commented Jan 20, 2022

CAP_BPF is a relatively recent capability and when it is missing attempting to add it will result in the Invalid argument error. To prevent getting started issues, going to opt for documenting more permissive caps but call out that this can be more specific.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants