# Wipe and Rails? (secure file deletes)

**URL:** <https://www.ruby-forum.com/t/wipe-and-rails-secure-file-deletes/90728>\
**Category:** Rails\
**Created:** [March 31, 2007, 3:49pm UTC](https://www.ruby-forum.com/t/wipe-and-rails-secure-file-deletes/90728 "2007-03-31T15:49:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![wpwood](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/d6d6ee/32.png) [@wpwood](https://www.ruby-forum.com/u/wpwood)\
**Post date:** [March 31, 2007, 3:49pm UTC](https://www.ruby-forum.com/t/wipe-and-rails-secure-file-deletes/90728/1 "2007-03-31T15:49:26Z")

</div>

Hi,

I want to use secure file deletes in my app so that the files are  
irretrievable after deletion (the files contain personal health  
information). My hosting service has Wipe installed  
([http://wipe.sourceforge.net/](http://wipe.sourceforge.net/)). I’d really appreciate hearing from  
anyone who has any experience with doing secure file deletes within a  
Rails app. Is Wipe the best tool to use? I’ve never used any of the  
utilities that are out there for this.

Thanks,  
Bill

---

<div class="post-metadata">

**Author:** ![wpwood](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/d6d6ee/32.png) [@wpwood](https://www.ruby-forum.com/u/wpwood)\
**Post date:** [March 31, 2007, 4:44pm UTC](https://www.ruby-forum.com/t/wipe-and-rails-secure-file-deletes/90728/2 "2007-03-31T16:44:30Z")

</div>

Bill W. wrote:

> I want to use secure file deletes in my app so that the files are  
> irretrievable after deletion (the files contain personal health  
> information). My hosting service has Wipe installed  
> ([http://wipe.sourceforge.net/](http://wipe.sourceforge.net/)). I’d really appreciate hearing from anyone  
> who has any experience with doing secure file deletes within a Rails app.  
> Is Wipe the best tool to use? I’ve never used any of the utilities that  
> are out there for this.

Don’t you have ‘shred’ from the command line? Would this work?

system(“shred insecure\_file.dat -zu &”)

Note the command detaches with &, so a slow shred won’t slow down your  
server’s response.

And note that you cannot guarantee security like this; you must start  
with  
your server’s physical security. All kinds of artifacts from the  
information  
will remain on your hard drive.

–  
Phlip  
["Pigleg too?", week 1](http://flea.sourceforge.net/PiglegToo_1.html)

---

<div class="post-metadata">

**Author:** ![wpwood](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/d6d6ee/32.png) [@wpwood](https://www.ruby-forum.com/u/wpwood)\
**Post date:** [March 31, 2007, 5:18pm UTC](https://www.ruby-forum.com/t/wipe-and-rails-secure-file-deletes/90728/3 "2007-03-31T17:18:38Z")

</div>

Hi Phlip,  
Phlip wrote:

> Don’t you have ‘shred’ from the command line?  
> Would this work?
> 
> system(“shred insecure\_file.dat -zu &”)
> 
> Note the command detaches with &, so a slow  
> shred won’t slow down your server’s response.

Thanks for the note on ‘&’. I just checked and shred is available, but  
I  
didn’t know about the detach option. I’ve been looking for something  
asynchronous to avoid a negative impact to the visitor experience. I  
was  
also hoping for something that was more integral to the file system. Do  
you  
have any experience with srm? ([http://srm.sourceforge.net/](http://srm.sourceforge.net/) )

> And note that you cannot guarantee security like this;  
> you must start with your server’s physical security.  
> All kinds of artifacts from the information will remain  
> on your hard drive.

This is my first ‘dive’ into this and, yeah, it’s pretty complicated.  
Looks  
like I need to know, at a minimum, the type of devices in use, the setup  
of  
the devices wrt RAID, and the file system in use. I’m beginning to  
wonder  
if my goals are achievable on an VPS setup. Any experience / opinions  
much  
appreciated.

Best regards,  
Bill
