LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-24-2006, 10:56 AM   #1
sweetnsourbkr
Member
 
Registered: Aug 2005
Location: Bay
Distribution: Zenwalk, OpenBSD, Slackware
Posts: 167

Rep: Reputation: 30
Deleted files


I was reading a column on cnet about deleted files in the iPod hard drives. I knew that as far as FAT filesystems went, deleted files could be undeleted because files are flagged when they're 'deleted' and not actually obliterated.

Now, I don't know what filesystem the iPod uses on their hdds (I don't own one), but what about the ext3 and reiserfs filesystems? Is data security a matter of filesystem design, or is it a hardware limitation?

Is this just a matter of using magnetic drives that have this problem? When I delete something, I'd like to be sure it is truly gone, and not just flagged.

Does flash memory work the same way?
 
Old 01-24-2006, 11:28 AM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
Almost all writable media works this way. Otherwise, erasing a 10GB file would mean writing 10GB - really 50 to 60GB with magnetic media, due to residual magnetic polarization.

Over time, files are overwritten. While there are some programs that claim to securely erase files (by multiply overwriting), their effectiveness is a function of the underlying filesystems allocation mechanism.

For example, from the man page for the Linux 'shred' command:

CAUTION: Note that shred relies on a very important assumption: that
the filesystem overwrites data in place. This is the traditional way
to do things, but many modern filesystem designs do not satisfy this
assumption. The following are examples of filesystems on which shred
is not effective:

* log-structured or journaled filesystems, such as those supplied with

AIX and Solaris (and JFS, ReiserFS, XFS, Ext3, etc.)

* filesystems that write redundant data and carry on even if some
writes

fail, such as RAID-based filesystems

* filesystems that make snapshots, such as Network Appliance’s NFS
server

* filesystems that cache in temporary locations, such as NFS

version 3 clients

* compressed filesystems

In addition, file system backups and remote mirrors may contain copies
of the file that cannot be removed, and that will allow a shredded file
to be recovered later.
 
Old 01-24-2006, 11:30 AM   #3
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
None of the 'mainstream' filesystems actually overwrite the data sectors of files when deleting: fat, ntfs, ext2/3, xfs, or reiserfs. They just remove varying amounts of filesystem metadata. There is a program called 'shred' that can help, on some filesystems.
 
Old 01-24-2006, 02:50 PM   #4
sweetnsourbkr
Member
 
Registered: Aug 2005
Location: Bay
Distribution: Zenwalk, OpenBSD, Slackware
Posts: 167

Original Poster
Rep: Reputation: 30
Interesting. Thanks for the insight.

But what about flash RAM media? Would those be susceptible to 'residual' data if the data is disposed of properly through say, the shred command, and it's on a FAT filesystem?
 
Old 01-24-2006, 03:05 PM   #5
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Mint, MX, antiX, SystemRescue
Posts: 2,337

Rep: Reputation: 358Reputation: 358Reputation: 358Reputation: 358
I would expect flash media to not have all the problems of magnetic media "if the data is disposed of properly". But the ultimate way to properly dispose of such data is unbeknownst to me.

You could try a little test. Write your phone number and address to your flashdrive memory. Then erase it as securely as you know how. Tag it with a sticker that says "Al-Quieda meeting, this Friday, 7:00pm, my house" and mail it off to the NSA. See if anybody shows up!

;-)
 
Old 01-24-2006, 03:57 PM   #6
sweetnsourbkr
Member
 
Registered: Aug 2005
Location: Bay
Distribution: Zenwalk, OpenBSD, Slackware
Posts: 167

Original Poster
Rep: Reputation: 30
 
Old 01-24-2006, 04:40 PM   #7
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
LOL @ haertig.

In all seriousness, flash will probably not have residual data issues, once the individual bytes/sectors have been overwritten.
 
Old 01-31-2006, 07:27 AM   #8
qwerty
Member
 
Registered: Feb 2005
Location: England
Distribution: Ubuntu 5.10
Posts: 80

Rep: Reputation: 15
How unreliable is 'shred' with journaled file systems?

The info page for 'shred' says that if it is used on a journaled file system it won't "reliably operate". Does this mean that it provides no shredding whatsoever or does it mean that files will be shredded to some extent but not as securely as on a non-journaled filesystem?

Reading this seems to suggest that its only insecure because the journal keeps track of the files that have been shredded. Other than this though, is the security level the same as on a non-journaled file system?

Last edited by qwerty; 01-31-2006 at 07:43 AM.
 
Old 01-31-2006, 07:49 AM   #9
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by Matir
None of the 'mainstream' filesystems actually overwrite the data sectors of files when deleting: fat, ntfs, ext2/3, xfs, or reiserfs. They just remove varying amounts of filesystem metadata. There is a program called 'shred' that can help, on some filesystems.
One really handy utility is "Darik's Boot and Nuke"--a mini-linux and secure erase program that boots from a floppy. It includes some of the routines that are used to erase classified data.
 
Old 01-31-2006, 08:29 AM   #10
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Quote:
Originally Posted by qwerty
The info page for 'shred' says that if it is used on a journaled file system it won't "reliably operate". Does this mean that it provides no shredding whatsoever or does it mean that files will be shredded to some extent but not as securely as on a non-journaled filesystem?

Reading this seems to suggest that its only insecure because the journal keeps track of the files that have been shredded. Other than this though, is the security level the same as on a non-journaled file system?
AFAIK, it should be. Provided, of course, that the filesystem does in-place overwrites. I am fairly certain ext3 does.
 
Old 01-31-2006, 08:31 AM   #11
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
Qwerty: The problem on a journaled file system is that there's no way to guarantee that the writes are occuring to the sectors of the file (as opposed to newly alllocated sectors).

In that case, the only way to shred is at the device or partition level. That is shreding the partition /dev/hda1 (for example) will get rid of the data on that partition - because there's no filesystem in the way.

As an alternative to shred, you can look at scrub which "can also create a file and expand it until a file system is full in order to attempt to reclaim and scrub file systems blocks belonging to deleted files if scrubbing the raw disk device is not possible"

Either of the above methods will work under any filesystem, but it can take a long time (many hours) depending on the size of the partition or the amount of free space respectively.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Help - Deleted Files fpdesignco Linux - Enterprise 3 11-05-2005 09:21 AM
Deleted Files wardialer Linux - Newbie 2 02-28-2005 03:12 AM
Deleted files? tilt32 Linux - Newbie 2 01-20-2005 05:06 PM
How to delete the destination files while the source files deleted in cp -u ? myunicom Linux - General 4 09-26-2003 01:13 PM
Deleted files!!! davez530 Linux - Newbie 3 05-18-2003 08:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration