Re: utterly unremoveable file
On Sun, May 04, 2003 at 03:25:33PM +0800, Robert Storey wrote:
> On Sun, 4 May 2003 02:19:45 -0400 Rick Pasotto <rick@niof.net> wrote:
>
> > How is it possible to create (actually I want to know how to remove)
> > a seemingly unremoveable file. Even when logged in as root and with
> > the file system mounted on a different mount point *nothing* seems
> > to get rid of it. Not 'rm', not 'mv', not 'cat /dev/null >', not
> > chown, not chmod. I can tar the directory and then untar it
> > elsewhere, remove the file from that directory, create a new tar
> > file, rename the original directory and untar the new tar file but I
> > can't remove the old directory since it still contains the offending
> > file.
>
> Possibly the file has been made "immutable" with the chattr command.
> To find out, try the lsattr command:
>
> lsattr filename
>
> If it has an "i" (immutable) flag, you can remove it:
>
> chattr -i filename
>
> You might have to be root to do this, especially on a journaled
> filesystem. See "man chattr" and "man lsattr".
Thanks, that was the problem -- except that the file also had the 'u'
and the 'a' bits set.
--
"I will not be pushed, filed, stamped, indexed, briefed,
debriefed, or numbered. My life is my own." -- The Prisoner
Rick Pasotto rick@niof.net http://www.niof.net
Reply to: