Interview Prep/Linux/Disk space, inodes and filesystems

A file can't be deleted even by root: `rm: cannot remove 'resolv.conf': Operation not permitted`.

BeginnerTroubleshootingDisk space, inodes and filesystems
Answer

Likely causes → The immutable (i) or append-only (a) attribute is set.

Diagnose →

lsattr /etc/resolv.conf

Fix → sudo chattr -i /etc/resolv.conf, make the change, then re-apply if that was intentional.

Prevent → Document when you set chattr +i; config tools fail strangely when they hit immutable files.

All Linux questions Roadmap: Linux

More on Disk space, inodes and filesystems