![]() ![]() ![]() 4 years, 9 months ago wouldn't that be setfattr/ getfattr - see man xattr's related section 4 years, 9 months ago Possibly related question: Unable to change file attributes (e.g. But after all, it's best left to be managed e.g. Or chattr +i /etc/nf after making it a static file instead of a symlink, but beware that whatever tries to write it, might not like the resulting errors.ġ month, 2 weeks ago Related Topics debian xattr Comments 4 years, 9 months ago Why do you want to make it immutable in the first place? If there's some process making unwanted changes to it, we should rather go after this one and change the underlying issues instead of going for the symptoms. ![]() If you have other programs that might modify it (like a DHCP client), you'll have to see about reconfiguring them. Note that the selected mode of operation for this file is detected fully automatically, depending on whether /etc/nf is a symlink to /run/systemd/resolve/nf or lists In this mode of operation systemd-resolved isĬonsumer rather than provider of this configuration file. Alternatively, /etc/nf may be managed by other packages, in which case systemd-resolved will read it for DNS configuration data.Three modes of handling /etc/nf (see nf(5)) are supported: systemd-resolved should be smart enough to leave the file alone if you replace the symlink with a static file: You'll need to find some other way to prevent your programs from modifying it. Not all flags are supported or utilized by all filesystems refer to filesystem-specific man pages such as btrfs(5), ext4(5), and xfs(5) for more filesystem-specific details.Īnd there's no mention of the immutable flag or chattr in tmpfs(5).ĪCLs or extended attributes have nothing to do with this, chattr attributes are stored directly on the inode, as seen for ext4 in this table of the inode structure. Sudo findmnt -fn $(dirname $(realpath /etc/nf)) | grep tmpfsĪs you saw, it seems you can't set chattr attributes on symlinks. No output info from these findmnt commands: sudo findmnt -fn / | grep -E "acl|user_xattr" Ii acl 2.2.52-3+b1 amd64 Access control list utilities ||/ Name Version Architecture Description |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend How to set chattr +i for my /etc/nf?įilesystem 1K-blocks Used Available Use% Mounted on Sudo chattr +i /etc/resolvconf/run/nfĬhattr: Inappropriate ioctl for device while reading flags on /etc/resolvconf/run/nf Lrwxrwxrwx 1 root root 31 Jan 8 15:08 /etc/nf -> /etc/resolvconf/run/nf Now to chattr +i for my /etc/nf : sudo chattr +i /etc/nfĬhattr: Operation not supported while reading flags on /etc/nf The filesystem on my disk: $ sudo blkid | awk '' ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |