Score:0

nftables.conf - file permissions

fj flag

after the plain installation of nftables (ubuntu server 22.04) the permissions of the /etc/nftables.conf file are set to 755 (-rwxr-xr-x). i cannot believe that it's necessary that anyone has read and execute rights. so:

what are the correct minimum rights for nftables?

chmod 644 /etc/nftables.conf [?]

i looked through the web and man pages, but couldn't find a trusted answer.

Pilot6 avatar
cn flag
The file is owned by `root`, and it is not executable, so I don't see any problems
Score:0
cn flag

The /etc/nftables.conf has 755 permissions by default.

It is owned by the root user.

This means that only root user can write to this file. Everyone else can only read and execute it.

It is a text configuration file, so it is not executable. It doesn't make any practical difference how you set permissions 755 or 644.

But 644 looks more appropriate.

Shaun.M avatar
fj flag
thx, but still, does everyone needs read access? I could imagine that's a security risk.
Pilot6 avatar
cn flag
Yes, other users need read access, like to all other `.conf` files in etc. There is nothing secret there.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.