summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorTeoh Han Hui <teohhanhui@gmail.com>2021-05-22 01:48:20 +0800
committercyqsimon <28627918+cyqsimon@users.noreply.github.com>2023-08-25 16:13:44 +0800
commite4420fbfc62708879e60dc0975005c08aa69ef9a (patch)
tree1acdfcc293f4f4df040e3673a29e3a446b453368 /README.md
parent3d2599aefb8a16797c17b7fa21fbe787212387d8 (diff)
Fix setcap example
* Use POSIX sh command substitution syntax * Use `command -v` shell built-in instead of `which`
Diffstat (limited to 'README.md')
-rw-r--r--README.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/README.md b/README.md
index 00a0a0b..91260d0 100644
--- a/README.md
+++ b/README.md
@@ -125,7 +125,7 @@ OPTIONS:
On Linux, you can give the `bandwhich` binary a permanent capability to use the required privileges, so that you don't need to use `sudo bandwhich` anymore:
```bash
-sudo setcap cap_sys_ptrace,cap_dac_read_search,cap_net_raw,cap_net_admin+ep `which bandwhich`
+sudo setcap cap_sys_ptrace,cap_dac_read_search,cap_net_raw,cap_net_admin+ep $(command -v bandwhich)
```
`cap_sys_ptrace,cap_dac_read_search` gives `bandwhich` capability to list `/proc/<pid>/fd/` and resolve symlinks in that directory. It needs this capability to determine which opened port belongs to which process. `cap_net_raw,cap_net_admin` gives `bandwhich` capability to capture packets on your system.