sodcalculator

10 Tech How-To

Mac OS Sierra: How to Password Protect Folders

Guide 10-31896 · Updated · Step by step

To password protect a folder in macOS Sierra, you create an encrypted disk image using the built-in Disk Utility app. This method wraps your files in a password-protected container that requires a password to mount and access, and it works on all Macs running Sierra or later.

Why Password Protection Matters on a Mac

macOS Sierra (released in 2016) introduced a system-wide encryption option called FileVault, which encrypts your entire startup disk. However, FileVault only protects your data when your Mac is turned off. Once you log in, all files on the disk are accessible to anyone who uses your account. If you share your Mac with family members or colleagues, or if you store sensitive documents like tax returns, contracts, or personal notes, you need an extra layer of protection for specific folders. Encrypted disk images provide that layer: they are independent of your login, so even if someone has full access to your user account, they still need the folder’s password to open its contents.

How Encrypted Disk Images Work

An encrypted disk image is a single file (with a .dmg extension) that acts like a virtual hard drive. When you create it, you choose a password and an encryption algorithm (AES-128 or AES-256). The Disk Utility app then creates a container that stores your files in encrypted form. To view the files, you double-click the .dmg file, enter the password, and the image mounts as a new volume on your desktop or in the Finder sidebar. You can drag files in and out of this mounted volume just like any other folder. When you unmount it (by dragging it to the Trash or pressing Command-E), the files become inaccessible again until the password is entered. This is much more secure than simply hiding a folder or using a third-party app that just changes the folder’s visibility.

Step-by-Step: Create an Encrypted Folder in macOS Sierra

  1. Open Disk Utility (found in Applications > Utilities).
  2. In the menu bar, click File > New Image > Image from Folder.
  3. Select the folder you want to protect and click Choose.
  4. In the dialog that appears, choose a name for the image file and decide where to save it (the default is your Desktop).
  5. Set Encryption to AES-256 (Recommended).
  6. Enter a strong password twice, and add a hint if you wish (the hint is visible to anyone, so avoid using the actual password).
  7. Choose an Image Format – select read/write if you want to add or remove files later, or compressed if you only need to read the files and want to save space.
  8. Click Save. Disk Utility will create the .dmg file and then ask if you want to delete the original folder. Choose Keep for now – you can delete it manually after verifying the image works.

Once created, double-click the .dmg file, enter the password, and the folder appears as a mounted volume. To lock it again, unmount it (right-click > Eject).

How to Choose a Strong Password and Keep It Safe

The security of an encrypted disk image depends entirely on the password you choose. A weak password can be guessed or cracked with brute-force tools, so follow these guidelines:

  • Use at least 12 characters, mixing uppercase, lowercase, numbers, and symbols.
  • Avoid dictionary words, names, birthdates, or any information that could be found on social media.
  • Use a passphrase – a sequence of random words or a sentence that only you know – which is both strong and memorable.
  • Never reuse a password that you use for email, banking, or other important accounts.
  • Store the password in a password manager (like the one built into macOS Keychain or a third-party app) so you don’t forget it.

There is no built-in recovery method for an encrypted disk image. If you forget the password, the data is permanently lost. Apple cannot recover it for you, so write it down and keep it in a secure place (like a safe) as a backup.

Common Problems and How to Fix Them

Users often run into a few issues when using encrypted disk images:

  • “The operation couldn’t be completed. (OSStatus error 100093.)” – This usually happens when the disk image is corrupted or the file path contains special characters. Try recreating the image with a simpler name.
  • Forgot the password – There is no way to reset it. If you have a hint, it will be displayed after a failed attempt. Otherwise, the data is unrecoverable.
  • The image mounts but shows “not recognized” – This can happen if the .dmg file is damaged or if you are trying to open it on a very old Mac. Ensure you are using a compatible version of macOS.
  • Disk space issues – The image takes up as much space as the files inside it (plus a small overhead). If you choose “compressed”, it will shrink when files are added, but it will still need temporary space during creation.

If you encounter errors during creation, check that you have enough free disk space and that the source folder is not on a network volume.

Alternatives: FileVault, Third-Party Apps, and ZIP Archives

Encrypted disk images are not the only way to protect folders on a Mac. Here are the main alternatives and when to use them:

  • FileVault (full-disk encryption) – Encrypts your entire startup disk. It protects everything when your Mac is off, but once you log in, all files are visible. Best for protecting against theft of the physical device, not for sharing a Mac.
  • Encrypted ZIP archives – You can create a password-protected ZIP file using Terminal (the zip -e command). This is simpler but less flexible: you have to unzip to edit files, and the encryption is not as strong as AES-256 in Disk Utility.
  • Third-party apps – Apps like Encrypto or Espionage offer more features (e.g., drag-and-drop encryption, cloud integration). However, they are not built-in and may require a purchase. Stick with Disk Utility if you want a free, reliable solution.
  • Hide the folder – You can hide a folder by prefixing its name with a dot (e.g., .secret) or using the chflags hidden command. This only hides it from the Finder; it does not provide any real security.

For most personal use, an encrypted disk image is the best balance of security, convenience, and cost (it’s free).

Frequently Asked Questions

Can I password protect a folder without creating a disk image?

macOS does not offer a native way to password-protect a single folder directly. The disk image method is the built-in solution, and it effectively creates a password-protected folder. Third-party apps can do it in place, but they are not free.

Will the password protect the folder if I move it to an external drive?

Yes, the .dmg file is self-contained. You can copy it to any USB drive, external hard drive, or cloud storage, and it will still require the password to open. The encryption is embedded in the file itself.

Can I add files to an encrypted folder later?

Yes, if you created the image with the “read/write” format. Just mount the image, drag files into the mounted volume, and unmount it. If you chose “compressed” or “read-only”, you cannot add files without recreating the image.

What happens if I forget the password?

There is no recovery mechanism. The data is encrypted with a key derived from your password, and without it, the files are mathematically impossible to access. Apple support cannot help. Always keep a backup of the password in a safe place.

Is AES-256 encryption strong enough?

Yes, AES-256 is the industry standard used by governments and financial institutions. It is considered cryptographically secure, meaning that with current technology, it would take billions of years to crack by brute force. The weak point is always the password, not the algorithm.

Does this work on newer macOS versions?

Yes, the Disk Utility method works identically on macOS High Sierra, Mojave, Catalina, Big Sur, Monterey, Ventura, Sonoma, and Sequoia. The menu names may change slightly, but the process is the same.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →