Bug #33
Cannot delete file as root
Description
A problem exists in Linux after a file recovery (e2fsck) leaving some of the recovered files with corrupt file attributes (lsattr). This causes any file modification or deletion to fail, even as root.
Added by Daniel Curtis almost 12 years ago. Updated over 11 years ago.
Description
A problem exists in Linux after a file recovery (e2fsck) leaving some of the recovered files with corrupt file attributes (lsattr). This causes any file modification or deletion to fail, even as root.
In order to remove the two file attributes needed for file deletion by root use the chattr
command with the -a
and the -i
flags on the file to change the *A*ppend and *I*mmutable file attributes.
chattr -i -a /path/to/some/file
Some attributes include: