LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Securely Wiping Data (https://www.linuxquestions.org/questions/linux-software-2/securely-wiping-data-486016/)

zok 09-22-2006 11:27 AM

Securely Wiping Data
 
Can anyone provide any recommendations for software to securely wipe files and folders in Linux?

Thanks.

J.W. 09-22-2006 12:30 PM

This may be of interest: http://dban.sourceforge.net/

w3bd3vil 09-22-2006 12:42 PM

or maybe wipe.sf.net

zok 09-22-2006 12:47 PM

I've used dban before, but it actually creates a boot disk which destroys all the data on the drives. I'm looking for something that will run from within Linux that I can use to wipe only specific files and folders.

Thanks.

sosborne 09-22-2006 01:07 PM

If you are looking for shredding individual files, I do not think there is a tool to do it if you've implemented journaling, resierfs, or have a FS that makes copies of data in any way:

http://prefetch.net/blog/index.php/c...inux-commands/

This person has a good entry on the 'shred' utility & why it is not effective. I've been looking for awhile, but have yet to find any. The best that I can find is to copy my data files to a thumb drive or CD, wipe the disk & re-install everything. No fun. Something HAS to be out there... or, one would hope =).

hob 09-22-2006 02:21 PM

On this (Ubuntu) system the man page for shred says that the utility is effective on ext3 filesystems without journaling:

"In the case of ext3 file systems, the above disclaimer applies (and shred is thus of limited effectiveness) only in data=journal mode, which journals file data in addition to just metadata. In both the data=ordered (default) and data=writeback modes, shred works as usual."

So it should be OK unless the administrator has specifically enabled journaling on the filesystem that holds the target.

EDIT: Modified wording for clarity.

farslayer 09-22-2006 03:07 PM

ext3 without journaling is ext2 no ? the whole point of ext3 is the added journaling. otherwise you would be running EXT2..

the man page for shred in Debian states it a bit differently than that..
Code:

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.)


J.W. 09-22-2006 11:02 PM

Quote:

Originally Posted by farslayer
ext3 without journaling is ext2 no ?

I don't know how Ubuntu might do things, but the above is correct... "ext2 + journalling = ext3"

hob 09-23-2006 06:25 AM

I'm not an expert, but I believe than ext3 has other extensions which may work on ext3 filesystems, and that the code automatically downgrades to ext2 mode if the actual filesystem was formatted as ext2. The Wikipedia article talks about directory indexes and support for resizing: http://en.wikipedia.org/wiki/Ext3.

My point was really that Red Hat, Fedora, Ubuntu and Debian format and mount filesystems as ext3 by default, but do not actually enable the journaling - so shred should be OK on most systems.

The Ubuntu (Dapper) package is 5.93-5ubuntu4, so the actual shred utility and documentation that I'm looking at could be more recent than on other systems, I guess.

farslayer 09-23-2006 11:10 AM

if it's ext3 journaling is enabled.. if you mount an ext3 partition as EXT2, that is the only time journaling is disabled..

Journaling for ext3 is on by default otherwise it wouldn't be considered a jouraling file system and would simply be called ext2...

hob 09-23-2006 12:30 PM

Quote:

Originally Posted by farslayer
if it's ext3 journaling is enabled.. if you mount an ext3 partition as EXT2, that is the only time journaling is disabled..

Journaling for ext3 is on by default otherwise it wouldn't be considered a jouraling file system and would simply be called ext2...

The ext3 journaling actually has several modes, and I think that this is confusing things. ext3 journals metadata by default, but it does not journal alterations to the files by default. As the bit I quoted says, the man page for shred (for this version at least) specifies that it is the non-default modes of ext3 that stop shred working correctly.


All times are GMT -5. The time now is 04:30 PM.