How to Password Protect a Folder in a Mac

  • MORE

Not all of your files are meant to be seen by everyone. Your friends and family may not appreciate this truth, but that's just the way it is sometimes. Luckily, MacBook owners can protect their sensitive files from prying eyes by password protecting specific folders.image 3158391502112685

Many paid programs offer similar functionality, but we prefer this free method built into Apple that allows folders to be turned into protected disk images. This goes as far back as Mac OS X 10.6 Snow Leopard.

1. Click Command + Shift + A to open the Applications folder.01

2. Open the Utilities folder within Applications.02 3158391502111450

3. Open Disk Utility.03 3158391502111450

4. Click File.04 3158391502111449

5. Select New Image.

05 3158391502111450

6. Select Image from Folder.

06 3158391502111450

7. Select the folder you wish to protect and click Open.

07 3158391502111451

8. Click on the Image Format option menu and select read/write.08 3158391502111449

9. Click on the Encryption menu and click 128-bit AES encryption.

09 3158391502111449

 

10. Enter the password for this folder twice, and click Choose.10 3158391502111449

11. Name the locked disk image and click Save.

11 3158391502111450

12. Click Done.

12 3158391502111449

You've turned your folder into a locked disk image! You can delete the original folder now, if you'd like. Just don't delete that .DMG file!

13 3158391502111451

And just like a folder, you can add items to your password-protected disk image before ejecting it.

screen shot 2017 08 07 at 8.23.04 am

MacBook Image Credit: Shaun Lucas/ Laptop Mag

 

Author Bio
Henry T. Casey
Henry T. Casey,
After graduating from Bard College a B.A. in Literature, Henry T. Casey worked in publishing and product development at Rizzoli and The Metropolitan Museum of Art, respectively. Henry joined Tom's Guide and LAPTOP having written for The Content Strategist, Tech Radar and Patek Philippe International Magazine. He divides his free time between going to live concerts, listening to too many podcasts, and mastering his cold brew coffee process. Content rules everything around him.
Henry T. Casey, on
Add a comment
13 comments
  • David Gardner Says:

    Your instructions are great and easy to follow. I only have one question, after I open the encrypted file once, it appears that the file no longer requires the password to open it. Is that correct?

  • Nayema laboni Says:

    I do not see a file tab on disk utility and I use high sierra

  • Mynameisnotlongenough Says:

    When I open Disk Utility, there is nothing called 'file' for me to click on anywhere - the whole screenshot doesn't look anything like what I get.

  • Anonymous Says:

    So helpful!!! Thanks!! I can't believe that this was possible. I thought I knew everything computer wise but I was wrong! This is amazing and something I thought wasn't possible. I thought I had to do all these downloads but no!!! Thanks again.

  • flotonus Says:

    Regarding capacity limitation:
    1. Copy a huge file into the folder that you use to build the image
    2. Delete file from image after mounting it. The capacity will stay the same as initially built.

  • Haamed Says:

    I tried this and the capacity of my password protected folder (dmg) is 10 mb, how can i changed that to 10 GB ?

  • Gobi Bhuv Says:

    self-expandible -- sparsebundle folder works only in the new APFS and not in the older HFS+ from what I read on the net. So you need High Sierra to start with and yoiur drive formatted to APFS.

  • Andrew Says:

    There's a key factor missing in this article that I'm running into. If you're getting an "Operation failed" error message, this might be why.

    The drive that the disk image is created on must have enough room for BOTH the data being protected AND the disk image. So if you're creating a disk image to file-protect 400GB of data on a 500GB external hard drive, it won't work.

    The way I think of it is that Disk Utility is creating a completely separate virtual disk equal to your data to be password-protected, then copying that data into the new virtual disk. So in the end, you must have at least twice the available storage on the main drive as the data you're trying to protect. (Makes sense if you think about it.)

    I'm fairly sure I'm correct about this (it's all new to me), but if I'm not, someone please explain! :)

  • ken kin Says:

    Thanks for the tip. So how do we undo it?

  • Amedeo Says:

    If you want to make it self-expandible use the sparsebundle type and set a very big value (1TB).
    It would start small then will grow until 1TB is reached

  • GDAWG Says:

    Thanks for this. I've just done it but the folder size doesn't expand with added items. It says "there is not enough storage space in this folder... etc etc".

  • Johnny Appleseed Says:

    Alternatively you could set a folder's permissions to write-only for everyone, then switch to read-write for yourself when required.

    (Of course, don’t forget to lock the settings so it will prompt for a password)

  • Mike C. Says:

    I tried doing this and I got 'Operation failed with status 28.'
    Do you know what this means?
    I think this is a great idea if I can get it to work. Otherwise, I use Veracrypt. Thanks.

Back to top