Password Protect Folders & Files in Mac OS X with Encrypted Disk Images

Jan 11, 2012 - 25 Comments

Password Protect a Folder and Files in Mac OS X

You can password protect files and folders in Mac OS X by using a trick with disk images. Here’s how it works; by placing files inside of an encrypted disk image, that disk image will work like a password protected folder and require a password before it’s mounted, preventing unauthorized access to all of the contents.

How to Password Protect Files & Folders in Mac OS X with Disk Images

Do this along with general password protection for maximum effect.

  • Launch “Disk Utility” located in /Applications/Utilities
  • Click on the “New Image” button at the top of the app
  • Create a new disk image

  • Name the disk image and set a file size that is appropriate for what you intend to store in there
  • Click on the contextual menu alongside “Encryption” and choose either 128 or 256-bit encryption (256 is stronger)
  • Disk Image encryption

  • Click “Create”
  • At the next screen you will set a password to access the folder – do not lose this password, you will not be able to open the disk image if you do
  • Optional: Uncheck the box next to “Remember password in keychain” – only do this if you’re the only user on the Mac, otherwise anyone can open the image without the password
  • Set a password for the disk image

  • Click “OK” to create the disk image

The encrypted disk image is now created. Now you need to locate the image, mount it which will require the password set in the creation process, and drag files and folders into the mounted image that you want password protected. The default location for new disk images is the Desktop, but if you saved it elsewhere, look there instead.

Copying files to protect by password with an encrypted image

Once you are finished copying files and folders to the mounted disk image, eject it like any other disk and the contents will be safely protected within, requiring the password to access again. Because the files and folders have been copied, you’ll probably want to delete the originals so they aren’t visible to anyone else.

Again, do not lose the password set or you will not be able to get access to the contents of the encrypted disk image.

This should not be considered a replacement for setting a general password for a Mac, and it’s always a good idea to lock down the screen when you’re away from the computer.

Filevault also provides encryption and security features, but older version have some potential speed drawbacks that are particularly noticeable on non-SSD drives, this is mostly a non-issue for OS X Lion and newer, including all modern macOS releases like Mojave, High Sierra, Sierra, El Capitan, Mavericks, and later releases, and most Macs with a SSD drive.

Update: There is a new and easier method of adding password protection by encrypting folders in Mac OS introduced from Mac OS X Mountain Lion and persisting in modern macOS releases onward.

.

Related articles:

Posted by: AJ in Mac OS, Security, Tips & Tricks

25 Comments

» Comments RSS Feed

  1. I successfully made a disk image that needed a password to mount, but!
    Control/clicking the image in Disk Utility, and choosing “image from” (name of disk image), produced a copy that was not protected, with easy access to the documents within.
    With this possibility, it adds no protection whatsoever πŸ˜•

    • ok says:

      That’s because each of the disk images you want to be password protected must be made via Disk Utility to be password protected

  2. Randall says:

    This article is incomplete without a discussion of image format. In particular, the sparse bundles and how they resize up as needed.

  3. slc524 says:

    I followed all the instructions and got the encrypted image – but when i tried putting files in it – it says there is not enough space.

    Can someone help please?

  4. WBOL says:

    How can I encrypt a specific folder in an external drive using Mac OS X Yosemite? I don’t need to encrypt the whole external drive. I only need to encrypt a specific folder in an external drive using Mac OS Yosemite. Please help.

    • slc524 says:

      I want to do the same thing – and I was able to get the encrypted folder.

      But any file i put in says there is not enough space.

  5. Ursi says:

    Hi,

    I have done step by step, however when I open it again, this doesnt ask for a password.
    Pls help

  6. […] is a new means of password protecting folders and sensitive files introduced in OS X Mountain Lion that lets you create a new encrypted disk […]

  7. takamine says:

    i’m also up a creek w/out a paddle in that I’ve lost/forgotten the password on my external HDD that was formatted/encrypted with mac os x lion… :(

    Any suggestions as to how to save my data?

    I’ve gotten some programs like DiskDrill but am afraid they are only going to search for deleted files and might corrupt the encrypted data if I try to restore anything.

    Thanks for any assistance!! :D

    • Anon says:

      No way to save your files :( you’re on the path to the hell and there is no way to save or recovery the files that you forgotten the password for your external drive and encrypting the external hard drive is totally sh*t and because if you lost the password you will also lost your important files and if you want to keep your files protected the best way to do is hiding your external drive in secret location only that’s the way helps!

  8. syko says:

    mee too?

  9. el says:

    i’ve lost the password to my protected folder. is there any way to retrieve it or unlock the folder still?? help!

    • William says:

      I have the same problem!

    • syko says:

      did u figure it out?

    • Anon says:

      You can’t unlock or recovery the drive it’s gone and you can only loss the important files that’s located in your folder with encrypted password.

      Sorry to hear that :( there is no way to recovery them if you even go to hard drive store they will tell you to format your hard drive if you wanted to use regularly only the thing i would suggest that you wanted to keep your files secretly in desktop, the best way to do is use the MacHider app it’s the best and safest way you will not loss any files that’s hidden from your computer and therefore it would be danger if you step the password, But if you wanted to stay safe with the password please locate your password in your email folder or 1Password app so you won’t forget it!

  10. […] recently showed you how to password protect files and folders using encrypted Disk Images in Mac OS X, but if you have an external drive you can go a step […]

  11. Bufo says:

    I’d love to use dmg or encrypted dmgs but how do I open (mount) them in linux or windows?

    They would be the ideal solution to take personal info in a usb key; even if lost, the info is secure.

  12. DMV says:

    Tried it; didn’t work; when I selected the 1 TB disk image in my iMac, running 10.7.2, it said there wasn’t enough room for the disc, but I have only 100 GB. The dialogue box doesn’t show an option to select the size and the format doesn’t show OS Extended Journal, but simply read/write or compressed. Since I can’t select the size, I think it thinks the folder has no room in it. Are you guys sure this works in 10.7.2?

  13. Joseph says:

    Couldn’t you just eject the disk? Average person isn’t going to figure that out let alone encryption.

  14. Michael Steebs says:

    My name is Michael Steebers and I like to make videos based on your work

  15. Brad Zimmerman says:

    This is all well and good …but if you want to be 100% sure that your encrypted disk image is as secure as it can be then you will want to use TrueCrypt.

  16. Alex says:

    Fantastic idea, thanks!

Leave a Reply

 

Shop on Amazon.com and help support OSXDaily!

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates

Tips & Tricks

News

iPhone / iPad

Mac

Troubleshooting

Shop on Amazon to help support this site