Securer file sharing with Dropbox

March 11, 2011 · 14 comments

It’s tax season. Yay, right?

This time of year people are shuffling all kinds of documents around, and I know lots of people who don’t think twice about emailing documents with social security numbers and other sensitive personal information.

I’m just not cool with emailing stuff like that. I know that any files I send by email will probably exist forever and be stored on servers that may or may not always be secure. And who knows how good the recipient’s email password is.

Fortunately, there’s a pretty decent alternative to email attachments thanks to the good folks who make Dropbox.

If you absolutely need to send sensitive documents electronically and loathe fax machines as much as me, try this instead:

  1. Zip your files
  2. Put the zip file in your Dropbox ‘Public’ folder
  3. Email the file link, not the file

The recipient will have no problem downloading the file, and once he or she has done that, you can remove the file from your Public folder, effectively breaking the link. For added security, you could give the file an unguessable name. But the most important thing is that the file is never stored in email.

It’s just another one of Dropbox’s seemingly infinite practical uses, and I love it.

Update: Merlin loves it, too. And he’s got a big ole fun bag of geekery to make the process even more securer-er. Er something like that.

{ 9 comments… read them below or add one }

Joseph March 11, 2011 at 1:45 pm

Maybe I’m missing you getting the joke, but Merlin is making fun of you. This is not any more secure than simply emailing the file. Encrypt the file and then stick it in Dropbox. But then, if you encrypted it, you could just email it.

Reply

James Marwood March 11, 2011 at 7:22 pm

I don’t think so – Mann alludes to similar things in his Mac Power Users workflow episode. http://macpowerusers.com/2010/03/mpu-023-workflows-with-merlin-mann/

Personally I like to use encrypted zips, hidden in a nonsense-named sub-folder, with the password sent via SMS or passed verbally. The DMG idea is better, but I rarely deal with other mac users like this.

Reply

Arek Dreyer March 11, 2011 at 2:37 pm

Joseph: I’m missing Merlin’s jokiness. I don’t see it.

Reply

Arek Dreyer March 11, 2011 at 2:52 pm

You could make the following ApplesScript, then assign it to a Finder folder as Folder Action:

When an item is placed in the folder
1: Ask for a password (and verify) to be used for encryption
2: Tell Disk Utility to create a compressed and encrypted disk image of the item, using the supplied password for encryption.
3: Move the dmg to your Drobox Public folder
4: Optional: Open the DropBox Public folder in the Finder so you can see the newly moved dmg
4: Optional: Copy the link to the item into the clipboard
5: Optional: Tell Mail.app to open a new message with the link pasted into the message body

Now you need to communicate the password to the recipient by phone, SMS, whatever.

You may say, “Come on, only Mac users can use dmgs!” If your recipient is unfortunate to not have a Mac, then you could use zip -eP to crete an encrypted zip file instead of a dmg.

Reply

Eddie March 11, 2011 at 2:55 pm

Great ideas, Arek. If it’s Mac-to-Mac, I totally agree that secure disk images are the way to go.

Reply

Simon May 22, 2011 at 9:36 am

Hi all, I made and applescript to automate the workflow of Eddie and Merlin. Please give me feedback if it works for you and how one could improve it.

Cheers, Simon


(*
Hi, I'm Simon. I wrote this script.

It automates the workflow these guys suggested:
http://www.practicallyefficient.com/2011/03/11/securer-file-sharing-with-dropbox/
http://www.kungfugrippe.com/post/3786441300/dbox-trick

What it does:
- take files/folders and create a zip-file
- save the zip-file in your Public folder of dropbox
- set zip-file name: "$randomStuff_$timestamp.zip"
- copy the URL of the zip-file to your clipboard so you can use it anywhere you like pressing "cmd + V"

What it does not do:
- password protect the files (this would require somebody who actually knows shell-scripting :))
- handle folders correctly: it just takes the content of the folder (no directory structure inside the resulting zip-file)

It relies on you to:
- set the properties correctly (see below)
- set up a Hazel rule to remove the file automatically from Dropbox

Helpful:
- the timestamp can be converted to a human readable format typing "date -r timestamp" in terminal (without the "" and replacing timestamp with the number from the filename)

Usage:
- I would suggest you save it as an App so you can:
- open files with it (also using your launcher of choice, I use Alfred.app - highly recommendable and it's free)
- drop files on it

version 1.0: Original release
*)

--in the format of "Path:To:Your:Dropbox:Public:Folder:"
property dropboxPublicFolder : ((path to home folder) as string) & "Dropbox:Public:"
-- change the number in this link
property dropboxURL : "https://dl.getdropbox.com/u/123456/"
-- This text is copied to clipboard together with your url, just put "" to have no additionalText resulting in just the URL"
property additionalText : "For security reasons the file is not attached to this email and will only be available for download for the next 3 day under the above link"
-- true: shows message when finished / false: no message
property showMessage : true

--------------editing below this line at your own risk-------------------

on run
set theFileList to choose file with multiple selections allowed
handle(theFileList)
end run

on open theFileList
handle(theFileList)
end open

on multiDelimSplit(theString, theDelims)
try
set oldDelim to AppleScript's text item delimiters
set theList to {theString}
repeat with aDelim in theDelims
set AppleScript's text item delimiters to aDelim
set newList to {}
repeat with anItem in theList
set newList to newList & text items of anItem
end repeat
set theList to newList
end repeat
set AppleScript's text item delimiters to oldDelim
on error
set AppleScript's text item delimiters to oldDelims
end try
return theList
end multiDelimSplit

on randomString()
set x to {}
repeat (random number from 10 to 15) times
set end of x to some item of "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
if (random number from 0 to 1) is equal to 1 then
set end of x to some item of "0123456789"
end if
end repeat
return x as string
end randomString

on handle(fileList)
set toClipboard to ""
set unixTimestamp to do shell script "date +%s"

set termFiles to ""
repeat with each in fileList
set termFiles to termFiles & space & quoted form of POSIX path of each
end repeat

set myPath to quoted form of POSIX path of dropboxPublicFolder
set zipName to my randomString() & "_" & unixTimestamp & ".zip"
set zipFile to myPath & zipName

do shell script "zip -r -j " & zipFile & termFiles & " -x \\*.DS_Store"

tell application "Finder" to set the clipboard to dropboxURL & zipName & return & additionalText

if showMessage then
display dialog "URL is in clipboard" with title "securlyToDropbox finished" giving up after 3
end if
end handle

Reply

Rune May 25, 2011 at 2:53 pm

@Simon – Perfect, just what I looked for, thank you. I have no programming knowledge so I don’t know how to do it but I think it could be nice to have the option of replacing the dialog window with a Growl notification.

Also thanks to Eddie and Merlin for this amazing Dropbox tip.

Reply

Simon May 25, 2011 at 6:29 pm

@Rune – yes, Growl would be perfect for this. In fact I have it working with Growl on my system. Due to my geeky setup it’s easier to code but harder to share…so I will have to put in some extra time to make it work on any system. I’ll put it on my todo-list :)

Reply

Simon June 5, 2011 at 7:05 pm

growl support added!

Please find the script here: https://github.com/simontaennler/SimonsAppleScripts

/s

Reply

Leave a Comment

{ 5 trackbacks }

Previous post:

Next post: