{"id":12644,"date":"2025-10-22T11:24:53","date_gmt":"2025-10-22T06:24:53","guid":{"rendered":"https:\/\/alexeyka.zantsev.com\/?p=12644"},"modified":"2025-11-17T12:25:22","modified_gmt":"2025-11-17T07:25:22","slug":"linux-setcap","status":"publish","type":"post","link":"https:\/\/alexeyka.zantsev.com\/?p=12644","title":{"rendered":"Linux: setcap"},"content":{"rendered":"\n<p>Some settings to run Linux commands under unprivileged user without sudo:<\/p>\n\n\n\n<pre class=\"wp-block-code has-vivid-red-color has-text-color has-link-color wp-elements-e1ce72e468fc8bba36295a6d33a0d090\"><code>setcap cap_net_raw,cap_net_admin=eip \/usr\/sbin\/tcpdump\nsetcap cap_net_raw=ep \/usr\/sbin\/sngrep<\/code><\/pre>\n\n\n\n<p>After these steps you will be able to run tcpdump and sngrep as a non-root user.<\/p>\n\n\n\n<p><a href=\"https:\/\/man7.org\/linux\/man-pages\/man7\/capabilities.7.html\" data-type=\"link\" data-id=\"https:\/\/man7.org\/linux\/man-pages\/man7\/capabilities.7.html\" target=\"_blank\" rel=\"noreferrer noopener\">man 7 setcap<\/a>.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Some settings to run Linux commands under unprivileged user without sudo: After these steps you will be able to run tcpdump and sngrep as a non-root user. man 7 setcap.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[9,137,265,257],"class_list":["post-12644","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-linux","tag-permissions","tag-setcap","tag-sudo"],"_links":{"self":[{"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=\/wp\/v2\/posts\/12644","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=12644"}],"version-history":[{"count":2,"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=\/wp\/v2\/posts\/12644\/revisions"}],"predecessor-version":[{"id":12647,"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=\/wp\/v2\/posts\/12644\/revisions\/12647"}],"wp:attachment":[{"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=12644"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=12644"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=12644"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}