Forum Discussion
How to lock a folder on mac with password without disk utility?
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.zip
The -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