[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Linux FS Question



On Wed, 18 Jun 1997 stephen@yesay.demon.co.uk wrote:

> > Date:          Wed, 18 Jun 1997 09:01:23 -0500
> > To:            debian-user@lists.debian.org
> > From:          "Tim O'Brien" <tjobrien@Traveller.COM>
> > Subject:       Re: Linux FS Question
> 
> > Is there a way to securely delete a file? Or do I need to study the e2fs
> > and develop a program to do it? I'm sure there's lots of people out there
> > who'd like the ability to know that when something's been deleted, it's
> > gone; no line, no waiting.. Right now. 
> > 
> > Ideas? 
> > 
> 
> You could write a small c prog, that stats the file to get the size, 
> then open the file, write 0's to the whole file, close it and unlink.
> Most of this is standard library calls.
> 
> Stephen.

One example of a program to do this is can be found on sunsite.unc.edu in
/pub/Linux/utils/file/wipe.tgz

Also note that the chattr(1) program claims to set a file attribute that
will cause a file to be overwritten with zeros before it is deleted
from an ext2 file system.  This will not work because the required code
was removed from the Linux kernel in version 1.3.36 (Oct 95) and has not
been added back.  See the following comment from
/usr/src/linux/fs/ext2/truncate.c:

/*
 * Secure deletion currently doesn't work. It interacts very badly
 * with buffers shared with memory mappings, and for that reason
 * can't be done in the truncate() routines. It should instead be
 * done separately in "release()" before calling the truncate routines
 * that will release the actual file blocks.
 *
 *              Linus
 */

Anyone looking for a kernel hacking project?

John Kuhn
johnk@penguin.grdl.noaa.gov


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: