Forum Discussion
How to lock a folder on mac with password without disk utility?
Hi tech experts,
I share a MacBook Pro at home with my younger brother. Everything works fine as the computer has decent hardware specs. However, there is one annoying issue that my brother could easily see my personal files on the Mac. Is there any simple way to let me lock a folder on mac with password so my brother couldn't see or open the files in that password protected folder? I want to restrict access to some private files on this shared Mac.
7 Replies
- OlaannIron Contributor
FileGuard is the best app for locking a folder on Mac. I have been using this app for months and it works quite good password protecting files and folders from Mac.
- RapikBronze Contributor
Locking a folder on Mac typically involves using built-in features like FileVault encryption, setting folder permissions, or creating a password-protected disk image (DMG). While these methods enhance security, there are some potential dangers or pitfalls to be aware of:
- Incorrect permissions or encryption errors can make the folder or data inaccessible.
- If you forget the password or encryption key, you may permanently lose access to the contents.
- Modifying permissions or encryption settings improperly can sometimes cause system or application errors.
- For example, changing permissions on system folders might interfere with normal OS operation.
- Turning on FileVault encrypts your entire disk. If you forget your login password or recovery key, you could be locked out.
- Data recovery options are limited without the recovery key.
- Creating password-protected disk images (DMGs) or encrypted containers can sometimes lead to corruption if interrupted during creation or mounting.
- If you set a password or permissions that you cannot remember or reset, you might be unable to access vital files without advanced recovery tools.
- Locking a folder on Mac can usually be bypassed with specialized tools if someone is sufficiently motivated.
- whestar11Iron Contributor
The Terminal app has the built-in feature to password protect a folder on mac with password.
First, open the Terminal app on your Mac.
Next, use the following command to lock a folder on mac with password:
zip -er ~/Desktop/Locked.zip /path/to/your/folder
Replace /path/to/your/folder with the full path of your folder.
You'll be prompted to enter and verify a password.
A Locked.zip file will appear on your Desktop—double-clicking it will require the password to extract.
Note: This method encrypts the content but does not prevent deletion of the ZIP file.
- WolfGanggIron Contributor
macOS doesn't support direct password protection for folders without using Disk Utility. But here are two simple workarounds:
1. Use Terminal (Encrypted ZIP):
Open Terminal and run:zip -er Locked.zip YourFolderName
It will prompt you to set a password. Just remember to delete the original folder if needed.
2. Use Free App (e.g., Encrypto):
Apps like Encrypto let you drag a folder, set a password, and encrypt it easily — no tech skills needed. - SasomparkIron Contributor
While you mentioned "without Disk Utility," creating a password-protected disk image is the most straightforward free method to lock a folder on Mac. This typically involves Disk Utility, but you can also do it via Terminal, which is free and built-in.
Here's how to lock a folder on Mac via Terminal:
- Open Terminal (Applications > Utilities > Terminal)
- Create a sparse disk image:
hdiutiil create -size 100m -fs HFS+J -volname "PrivateFolder" ~/Desktop/PrivateFolder.dmg
Adjust -size 100m to your needs.
This creates a disk image named PrivateFolder.dmg on your Desktop. - Convert the disk image to be password protected:
You can create a new encrypted image with:
hdiutiil create -encryption -size 100m -volname "PrivateFolder" -fs HFS+J ~/Desktop/PrivateFolder.dmg
During this process, you'll be prompted to set a password.
Note: About how to lock a folder on Mac. The above commands create a new encrypted disk image. You can then mount it and add your private files inside. When done, eject it; the files are protected.
- LossibleParfaitIron Contributor
You can use a third-party app to password protect folders on Mac with password. Encrypto is a free utility available in the Mac App Store (requires macOS 10.13 or later) that encrypts files or folders using AES‑256 encryption—the industry standard used by many major services.
How to password lock folders on Mac
1. Download and install it from the Mac App Store. It’s free and lightweight.
2. Drag your folder or file directly into the Encrypto window.
3. Set a strong password, and optionally a hint that reminds the recipient of the password (without revealing it)
4. Click Encrypt. The app outputs an encrypted file named like your original, with a .crypto extension. The encrypted file may be slightly smaller or larger due to compression.
5. You can either save the .crypto file on your disk (e.g. for personal secure storage) or share it via email, cloud, AirDrop, and more using built‑in sharing options in the app .
6. To open, simply double‑click the encrypted file (with Encrypto installed). Enter the password (hint is shown if included) to decrypt and restore the original content .
- HordwongIron Contributor
Using GnuPG (GPG) to lock a folder on Mac is a good free option if you're comfortable with command-line tools and encryption concepts. It allows you to encrypt individual files or entire folders, making them unreadable without a password or passphrase.
How GnuPG Works for Folder Locking:
- You encrypt files or folders, which then require a decryption key or passphrase to open.
- You don't create a transparent "mountable" folder like a disk image; instead, you encrypt files and decrypt when needed.
- It's secure and free, but requires some command-line operations.
How to Lock a Folder on Mac?
1. Install GPGTools
2. Encrypt Files or Folders
To encrypt a folder, you'll typically encrypt the contents (files) inside it, or the entire folder as a compressed archive.
Example:
First, compress the folder:zip -r PrivateFolder.zip /path/to/YourFolder
Then, encrypt the ZIP file:
gpg -c PrivateFolder.zipThe -c option creates a symmetric encrypted file, prompting you for a passphrase.
After encryption, you'll get PrivateFolder.zip.gpg.3. Decrypt When Needed
To open the folder:gpg -d PrivateFolder.zip.gpg > PrivateFolder.zip
Then unzip:unzip PrivateFolder.zip