- Advertisment -

How To: Lock folders in MacOS

What is a "Disk Image"?

In MacOS, you can’t directly lock any folder or file. Instead we create what is called a “Disk Image”, or “.dmg” file using the folder you want to lock. You might have noticed this type of file format when installing software. A disk image file, when opened, acts as a virtual USB drive where you can store files. We will create a disk image file that asks for a password when opened, where we can store our personal data. When we eject this virtual drive, the files will no longer be accessible, unless you click on the disk image file and enter the password to “mount” the virtual USB again. We will be using the built-in app “Disk Utility”.

Step 1: Creating the Disk Image.

First, keep your folder that you want to lock in an easy to find place. For example, my folder “Appleosophy”, is kept on the desktop. Next find the application “Disk Utility” (in spotlight search or in Applications folder in Finder) and open it. On the menu bar, you want to click on “File” -> “New Image” -> “Image from Folder”. In the pop-up, browse and select the folder that you want to protect.

- Advertisement -



Under “Save As”, you can change the name for your Disk Image file. By default it will match the name of the folder, or you can change it to something like “Private.” I am going to name mine as “Personal.” 

Under encryption you have two options: 128-bit and 256-bit. For casual locking 128-bit is sufficient, but if you are serious about 100% security, go with 256-bit. Note that to decrypt and encrypt 256-bit files takes more time, and is not recommended especially if you have large files. Once you select, enter the password you wish to have for your disk image.

Under “Image Format”, we are presented with numerous options, but we are only interested in two: “Compressed” and “Read/Write.” Both yield the same result, but the former gives you a disk image size that is smaller than the actual folder. The only difference is the decryption time, where “Read/Write” option decrypts and encrypts faster than “Compressed.”

Click on “Save”, and it may take time to generate depedning on your folder size.


Step 2: That's it!

Based on what location you selected (desktop for me) your disk image should have appeared in the respective location! Note that the original folder that you used to create your password protected disk image still exists, so you need to move that to trash, and empty the trash to get rid of it.

Try clicking on the disk image we just created, it should ask for your password. After you enter, you should see the disk mounted and opened for access! Note that even after closing the window, the disk will remain mounted until you eject it. After that, just click on the disk image file to enter the password again. You’re all set now! Start protecting the folders you need!

Remember to eject everytime you are done accessing your hidden folder!


Popular Stories

macOS Big Sur Wallpapers

With every new software release, a new wallpaper is introduced. Apple recently announced the next major update for macOS, named Big Sur. All you need...

Apple releases iOS 12.4.8 and watchOS 5.3.8 for older devices

Along with iOS & iPadOS 13.6, Apple has also released a security update for older devices running iOS 12. Apple has today released iOS 12.4.8...

Writer of the Month

Anton is a Designer & Writer for Appleosophy Media

Recent Stories

Apple seeds the fourth beta of iOS & iPadOS 14

Apple has today released the fourth developer beta of iOS & iPadOS 14 to registered developers along with watchOS 7 Beta 4 and tvOS...

Apple updates the iMac Pro with a 10-core processor as its base configuration and can go up to 256GB of Memory

Along with announcing the new 27-inch iMac Pro, Apple has also updated the iMac Pro to have a 3.0GHz 10-core Intel Xeon W processor...