How to Password Protect Folders on Mac?


Issue: How to Password Protect Folders on Mac?

I am not the only one who uses Mac, so I would like to password protect some of the folders. I am sure it’s possible to do it, but could you explain to me how?

Solved Answer

Users who share the computer with others often want to password protect folders on Mac or other computers. There’s no doubt that setting a passcode can prevent curious family members, roommates or colleagues from checking your pictures or secret documents.

Many third-party tools can help to protect your personal information. However, if you do not want to install additional software or research which program is the best for you, you can take advantage of built-in features of the Mac OS X and protect files without additional software.

Before starting, we highly recommend thinking about strong password[1] and writing it down. Of course, you should keep that piece of paper in the secret place only you know. Trust us; it’s easy to forget or get lost between different passwords!

How to Password Protect Folders on Mac

Two methods for protecting folders on Mac using built-in tools

Optimize now!
To restore your computer's peak performance, you have to purchase licensed version of Mac Washing Machine X9 repair software.

Mac users can take advantage of Disk Utility and exploit ZIP command in Terminal to password protect their folders on the computer.

Method 1. Protect Folders on Mac using Disk Utility

Disk Utility[2] is a built-in program in Mac which allows erasing, formatting, repairing or partitioning hard drives. However, this tool also allows creating an encrypted disk image of the folder you want to keep in private.

  1. Open Disk Utility.
  2. Go to File > New Image > Image from Folder.
    Protect Folders on Mac with Disk Utility
  3. Here click the folder you want to encrypt and hit Choose button.
  4. In the Save As box, you have to enter the name of the DMG file and set the location where you want to store it.
  5. Then you have to choose the type of Encryption (128-bit or 256-bit AES).
  6. Type your password and then Verify it in the pop-up window. Then click Choose.
    Set password to protect folders on Mac using Disk Utility

  7. From the Image Format drop-down menu, choose read/write option. Click Save.
  8. The progress dialog box shows up. Once you see “Operation successful” message, click Done button.

In order to access this folder, you have to double-click the DMG file, enter your password, and click OK. When you finish using files, you have not to forget to keep them protected. For that, you have to:

  • right-click the disk image icon that is created on your desktop;
  • from the pop-up menu choose Eject “Name of Disk Image” option.

TIP: You should also entirely delete files once you create the disk image. If you are afraid of terminating your files, you should backup them to the external storage device and then remove them from Mac.

Method 2. Password protect files on Mac using Terminal

Terminal[3] allows protecting files with a password by executing zip command:

  1. Open Applications folder.
  2. Go to Utilities.
  3. Open Terminal.
  4. Change the directory to your file location. The further instructions are made when the folder is on Mac’s desktop. If your file is in a different directory, change the path name or move your folder to the Desktop to simplify the task. If your file is on Desktop, enter this command to Terminal:
    cd Desktop
  5. Now enter the second command, but before that, you have to change the name of “” to your preferred ZIP archive’s name and replace “FolderToProtect” with the folder
    zip -e FolderToProtect/*

Password Protect Folders on Mac using Terminal

IMPORTANT: If the folder you want to protect contains subfolders, you have to change the “-e” to “-er” at the beginning of the command:
zip -er FolderToProtect/*

Optimize your system and make it work more efficiently

Optimize your system now! If you don't want to inspect your computer manually and struggle with trying to find issues that are slowing it down, you can use optimization software listed below. All these solutions have been tested by team to be sure that they help improve the system. To optimize your computer with only one click, select one of these tools:

do it now!
computer optimizer Happiness
Compatible with OS X
Your problem remained?
If you are not satisfied with Mac Washing Machine X9 and think that it failed to improve your computer, feel free to contact us! Please, give us all details related to your issue.
Mac Washing Machine X9 - a patented specialized Mac OS X repair program. It will diagnose your damaged computer. It will scan all System Files and Registry Keys that have been damaged by security threats.
This patented repair process uses a database of 25 million components that can replace any damaged or missing file on user's computer.
To repair damaged system, you have to purchase the licensed version of Mac Washing Machine X9 malware removal tool.

Protect your online privacy with a VPN client

A VPN is crucial when it comes to user privacy. Online trackers such as cookies can not only be used by social media platforms and other websites but also your Internet Service Provider and the government. Even if you apply the most secure settings via your web browser, you can still be tracked via apps that are connected to the internet. Besides, privacy-focused browsers like Tor is are not an optimal choice due to diminished connection speeds. The best solution for your ultimate privacy is Private Internet Access – be anonymous and secure online.


Data recovery tools can prevent permanent file loss

Data recovery software is one of the options that could help you recover your files. Once you delete a file, it does not vanish into thin air – it remains on your system as long as no new data is written on top of it. Data Recovery Pro is recovery software that searchers for working copies of deleted files within your hard drive. By using the tool, you can prevent loss of valuable documents, school work, personal pictures, and other crucial files.

About the author
Gabriel E. Hall
Gabriel E. Hall - Passionate computer expert

Gabriel E. Hall is an expert troubleshooter who has been working in the information technology industry for years.

Contact Gabriel E. Hall
About the company Esolutions


What you can add more about the problem: "How to Password Protect Folders on Mac?"