An easy way to encrypt sensitive folders

by Jane on February 22, 2011

Many of our laptops containing sensitive information — proprietary proposals, student grades, a secret plan to take over the world through speckle interferometry.  We all know the security risk of stolen laptops and thumb drives.  But many of us don’t want to encrypt our entire home directory.

Here’s an easy way to encrypt just the data you want encrypted.  You create an encrypted, password-protected disk image, and then drag your sensitive files inside.  To work with the files, double-click the disk image and enter the password.  To re-encrypt them, just “eject” the disk image.

You can also use this technique to encrypt a USB thumb drive — just choose a disk image filesize that fills the thumb drive.

Update:  If you’re using OS X 10.5 and don’t care about back-compatibility, select the “Sparse Bundle” disk image.  This allows the encrypted disk to grow in size.

{ 14 comments… read them below or add one }

1 Mike February 22, 2011 at 8:27 am

Like many of the tips on AstroBetter, this one is quite Mac-centric. A better, cross-platform solution is TrueCrypt which works on Windows, Mac or on Linux (after installation of realcrypt).


2 Jane Rigby February 22, 2011 at 9:24 am

Mike, we’re an explicitly mac-identified blog, in a mac-dominated profession. It’s entirely appropriate for us to discuss tips for mac users.

Absolutely, thanks for mentioning an alternative solution, using the multi-platform open source TrueCrypt. (I played with it last month while figuring out the best way to encrypt my own sensitive files.) Not sure it’s “better” though; the built-in OS X encryption is very simple to use, and requires no additional software to install.

“Better” is subjective anyway. Let’s agree that these are two good solutions to a common problem, that we can recommend to colleagues. Score.


3 Stuart February 22, 2011 at 10:04 am

Not sure I agree that astronomy in general is Mac dominated. Perhaps this is true in the US (and this is a US blog after all), but in my experience, in Europe and South America, Linux appears far more prevalent.


4 Ben Maughan February 22, 2011 at 5:16 pm

You are right – I failed to add all the OS X versions together! So it is more like 2:1 for linux – similar to IRAF as you say.

I also switch between a Mac laptop and a linux desktop (I suspect many others do the same).

Returning to the original topic, this means I have a preference for software that runs on both mac and linux, so I ended up using gpg for simple encryption tasks. That said, I’m always glad to hear about useful Mac tools, so keep them coming!

5 Jane Rigby February 22, 2011 at 10:30 am

Good point, Stuart. The high initial cost of macs may certainly be a factor.


6 Mike February 22, 2011 at 11:55 am

At the risk of belabouring this point, readers may be interested in the poll at

In summary, of 3000 votes

Linux: 56%
Mac OS X: 32%
Other. mostly Unix: 12%

7 Saurav February 22, 2011 at 2:21 pm

While I agree that there are more Linux users relative to Macs in astronomy, I think that the poll accentuates the disparity. IRAF was by far the best (?) and most-used data-reduction package 10-15 years ago; as a result, the astronomers who went to graduate school at the time overwhelmingly used IRAF (and also used to be more proficient in Unix). Now, there are other options that are available and many of the current generation of astronomers do not use IRAF. Combine this with the fact that the younger astronomers are also more likely to Mac users (simply because that’s about how long Mac OS X has been around); and you get the accentuated disparity.

8 Ben Maughan February 22, 2011 at 2:35 pm

A recent survey of CIAO users (Chandra X-ray analysis software) shows about 3 times as many linux users as OS X users, so I don’t think the IRAF results are too skewed, though this is based on 127 responses, so a much smaller sample. I suspect the users will skew much younger than IRAF though!

9 Saurav February 22, 2011 at 3:00 pm

Wait, Q#31 says that 35% always use one of the OS X versions for data analysis; which numbers are you using? So the numbers are similar (actually slightly better) than IRAF. Factor in (i) the number faculty is the similar as the number of post docs, grad students, and undergrads combined and (ii) 60% have been using the CIAO software for >5 years. So I am not convinced that this represents a different population than IRAF users.

Disclaimer: I use my OS X laptop for most purposes but use my Red Hat Box for most of my data-processing, including IRAF.

10 Ben Maughan February 22, 2011 at 5:23 pm

d’oh – replied to wrong comment – see above!

11 nick February 22, 2011 at 5:18 pm

Those polls are years old. Also, my anecdotal impression of Europe cancels out Stuart’s. Carry on, astrobetter!


12 Mike February 22, 2011 at 6:15 pm

It wasn’t my intention to start an OS flame war … I was merely skeptical of the statement “Mac-dominated profession”.

Like some others who have commented, I have a Mac laptop (mostly used for presentations), but I do most of my number crunching on linux.

Maybe Astro Better should run their own poll. Since it claims to be a “mac-identified” (not sure in what way) blog, this would set an upper limit on Mac astro users.


13 DS February 22, 2011 at 9:19 pm

My anecdotal experience (from several US institutions) is that astronomy is Linux-dominated at work, Mac-dominated at home or laptop. Though I did recently switch to a Mac at work, largely because I’d gotten used to it at home, and it allowed me to have root (all the Linux systems I’ve seen are centralized, which has both pluses and minuses).

So lots of us use Macs, but I could believe Linux is more commonly used by ~2:1. Not really appropriate to call it a “Mac-dominated profession”, but many of us do appreciate the tips.


14 Christophe April 28, 2011 at 9:48 am

I used encfs to encrypt files. It’s quite easily to install (needs MacFUSE) and Linux compatible.
BUT I began to suffer Kernel Panics related to memory usage. I thought it was hardware problems, switched the memory, but still had the same problems. I then decided to change and to use the crypted disk image, and no more Kernel Panics… It allows you to create links so that you can have the Firefox and Thunderbird profiles in the disk image, as well as the Skype, .ssh, and other sensitive directories, and link to the place they used to be.
Hope it helps,


{ 1 trackback }

Leave a Comment

Previous post:

Next post: