Project

General

Profile

Actions

Bug #33

closed
DC DC

Cannot delete file as root

Bug #33: Cannot delete file as root

Added by Daniel Curtis almost 13 years ago. Updated over 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
01/16/2013
Due date:
% Done:

100%

Estimated time:
Spent time:

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.

DC Updated by Daniel Curtis almost 13 years ago Actions #1

  • Status changed from New to Closed
  • % Done changed from 0 to 100

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

When the command finishes delete or modify the files normally.

DC Updated by Daniel Curtis over 12 years ago Actions #2

Some attributes include:

  • A - don't update atime
  • S - synchronous updates
  • D - synchronous directory updates
  • a - append only
  • c - compressed
  • d - no dump
  • i - immutable
  • j - data journaling
  • s - secure deletion
  • T - top of directory hierarchy
  • t - no tail-merging
  • u - undeletable
  • I - use hashed b-trees for directory lookups
Actions

Also available in: PDF Atom