facebook thumb

How to Password Protect a Folder on Mac and Prevent Unwanted Access to User Data


Suppose, you have sensitive or confidential data intended for private use only stored on your MacBook. And systematically or occasionally you give this laptop to another person who for some reason might be using the same user account as you do. Accordingly, you need to conceal your files and ensure no one will get to them without you knowing.

password protect your mac folders

Well, it is totally possible to protect specific files from being seen by someone else. All it takes is to lock the necessary folder on your Mac with a password. Of course, you could use one of a whole bunch of third-party apps that offer file and folder encryption possibilities, but we suggest you try onboard Mac utilities first.

How to Make a Password Protected Folder on Mac

The cost-free method available with the help of the built-in Apple tools allows creating protected disk images out of confidential folders. Take note, that the way of data protection described below applies to macOS High Sierra, as well as to earlier Mac OS X versions.

To create password protected folders on Mac, you need to access the ‘Disk Utility’ tool. You most likely know how to do that, but here's the instruction just in case:

  • 1. Click Command+Shift+N to access the ‘Applications’ folder, then find ‘Utilities.'
  • 2. In ‘Utilities’ folder, locate ‘Disk Utility’ and launch it.
  • 3. Click ‘File’ -> ‘New File’ -> ‘Image From Folder’ (shortcut ⇧+⌘+N) to select the folder you want to protect.

forbid access to your mac

Make settings for the Encryption type and Image Format from the available options. Typically, Mac users are recommended to pick ‘read/write’ for Image Format. Choosing the ‘read/write’ option will allow adding files to the .dmg disk image after it has been created. In case the files you want to protect occupy plenty of disk space, opt for ‘compressed’ option for Image Format. The image will take a while to create; however, it will be more compact.

128-bit AES encryption (recommended)’ is a standard setting for Encryption type, but if you have major security concerns, choose ‘256-bit AES encryption’. It is even safer but requires more time to encrypt.

locked folders on mac

Once finished, choose the name of the folder image and type in the password twice to secure your data. Be sure to use capitalized letters, numbers, and special symbols to make your password as strong as it only takes. Click ‘Save’ to confirm the settings and launch the image creation process.

As a result, you will get a secured .dmg file that you can later mount on your Mac upon entering the password. Feel free to delete the original folder you’ve turned into a secured image, if necessary. Actually, it would be quite bizarre to still keep it on the computer unprotected after you've taken the trouble to create an encrypted file.

Once you need to access the contents of the protected folder image, just double-click the .dmg file and type in the password used for its protection. It is possible to add items to the existing .dmg image if it has ‘write/read’ format. After being unlocked, the image will take some time to mount on your Mac. Once finished, you can move the mounted image (not the .dmg file) to Trash.

How to Lock Folders on Mac Using Sparse Image

Apart from standard disk image file, macOS High Sierra users can choose locking files by creating a sparse image or a sparse bundle.

  • Sparse image is an expandable file able to “shrink” and “grow,” if necessary. No extra disk space is used (.sparseimage file extension).
  • Sparse bundle is very similar to sparse image (.sparsebundle file extension). However, the image directory data is stored differently: while a sparse image is a single large file, a sparse bundle is actually an aggregation of several small files.

Users can set the size of sparse image files at their own discretion. This type of image would take up as much storage as is currently consumed by the files within the image. For instance, a user creates a sparse image meant to store 10GB of information, with only 5GB of it occupied at present. The file info will prove that a space of 5GB is occupied. However, a user still has another 5GB vacant, so it’s possible to add files and ‘grow’ the image later on.

download MacFly Pro now