Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Peter Hoeg <peter@hoeg.com>
To: netfilter@vger.kernel.org
Subject: Running nft --check as non-root
Date: Thu, 11 Aug 2022 23:53:35 +0800	[thread overview]
Message-ID: <874jyiu661.fsf@hoeg.com> (raw)


Hey all,

as part of deploying nftables rules on NixOS, I want to check the syntax before actually trying to deploy them.

Now, nft --check --file works fine when run as root but the builder used does not have root permissions (or access to sudo or anything like that). Is there any particular reason why nft --check needs to run as root or any way to make it work as !root?

$ nft --check --file foo; echo $?
1

$ sudo nft --check --file foo; echo $?
0

Thanks in advance,
Peter

             reply	other threads:[~2022-08-11 15:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-11 15:53 Peter Hoeg [this message]
2022-08-11 16:15 ` Running nft --check as non-root Florian Westphal
2022-08-12  5:15   ` Peter Hoeg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874jyiu661.fsf@hoeg.com \
    --to=peter@hoeg.com \
    --cc=netfilter@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox