How to Lock a Folder on Mac: Three Different Meanings

Updated Oct 30, 2026 6 min read
Quick answer

"Lock a folder" means three different things on a Mac. The Locked checkbox in Get Info stops edits and deletion but not viewing. Permissions can keep other user accounts out. Only encryption, such as an encrypted disk image, hides the contents from someone using your logged-in Mac. Pick by what you need to stop.

Steps use macOS 14 and later names. Menu wording can differ slightly between versions.

Which kind of lock do you need?

Three meanings of lock, and what each leaves open
You want to stop…UseWhat it does not stop
Accidental edits or deletionThe Locked checkboxAnyone opening and reading the files
Other user accounts on the MacSharing & PermissionsAdmins, or anyone logged in as you
Anyone at your logged-in Mac reading the contentsAn encrypted disk imageReading it while it is mounted
A thief reading a stolen MacFileVaultAnyone who knows your login password
Someone walking up to your Mac while you are awayThe Lock Screen passwordAnyone who knows your login password

Option 1: the Locked checkbox (stops changes)

  1. Select the folder in Finder

    Click it once.

  2. Open Get Info

    Press ⌘I. Apple lists this shortcut as the one that shows the Get Info window for the selected item.

  3. Tick Locked

    It is in the General section. The folder can no longer be renamed, moved to the Trash or changed. Apple's help page describes this checkbox for documents, so test it on your folder before you rely on it.

That flag applies to the folder itself. Files inside can still be edited. To lock everything inside as well, use Terminal:

Lock all items under a folder, then unlock them
chflags -R uchg ~/Documents/Taxes
chflags -R nouchg ~/Documents/Taxes

What the Locked checkbox does not stop

  • Reading. Apple describes the lock as protection from accidental change or deletion. It says nothing about keeping anyone out.
  • The Trash. Apple says that if you move a locked document to the Trash you get a warning, and that emptying the Trash deletes it. The lock slows deletion down. It does not prevent it.
  • Changes to the files inside a folder. Each file has its own flag. Use the Terminal command above to set it on all of them.

Option 2: permissions (keeps other accounts out)

  1. Open Get Info

    Select the folder and press ⌘I.

  2. Expand Sharing & Permissions

    Click the arrow if the section is closed, then click the padlock at the bottom right and authenticate. If the settings are greyed out, the padlock is still closed. Apple's wording is "Click the lock to unlock permission settings."

  3. Change access

    Set "everyone" to No Access. Leave your own account on Read & Write. Apple lists four settings: Read & Write, Read only, Write only (Drop Box) and No Access.

  4. Apply it to the contents

    Click the Action pop-up menu at the bottom of the window and choose Apply to enclosed items. Apple describes this as the way to pass the setting to everything inside the folder.

  5. Undo a mistake

    Before you close the Info window, choose Revert changes from the same Action menu.

The Terminal equivalent: remove group and other access
chmod -R go-rwx ~/Documents/Taxes

This helps when several people each have their own account on the Mac. It does nothing if someone is logged in as you, and an administrator can change permissions back. Create separate accounts in System Settings > Users & Groups for each person.

Account type matters. Apple says a Standard user can install apps and change their own settings but cannot add users or change other users' settings. An administrator can add and manage other users. Give family members or coworkers Standard accounts where you can. Apple does not say what one account may read in another account's folders by default, so do not assume. Run the permissions test below. The shared family Mac scenario walks through a typical setup.

Option 3: encryption (hides the contents)

To keep files unreadable even when someone is at your unlocked Mac, put them in an encrypted container. The full steps are in how to password protect a folder on Mac. Without Disk Utility, see the Terminal and app routes. For more on the container itself, read encrypted disk images on Mac.

Two Apple warnings apply to every encrypted image. If you forget the password, you cannot open the image or read its files. While the image is mounted, anyone with access to your computer can use the files in it. Eject it when you finish.

Test that your lock works

  1. Locked checkbox: try to rename the folder and drag it to the Trash. You should see a refusal or a warning. Reading it should still work, which is the expected result.
  2. Permissions: an administrator can create a Standard test account in System Settings > Users & Groups. Log in as that user and try to open the folder. Delete the test account afterwards.
  3. Encryption: eject the image, then try to open a file from Finder. It must not open. Mount the image again with the password and check that every file is there before you delete any original.
  4. Screen lock: press ⌃⌘Q, wake the display and check that it asks for your password.

What a lock leaves behind

A lock stops a person. It does not stop the Mac from keeping its own records. Check these four places.

  • Time Machine. A backup made before you encrypted still holds the plain files. Apple says excluded items still appear in Time Machine local snapshots, so exclusion is not a clean erase. The Options button is in System Settings > General > Time Machine.
  • Spotlight. Search may show names of files it has indexed. To keep a folder or disk out of search, add it in System Settings > Spotlight > Search Privacy. Apple warns that this can stop update notices for some apps.
  • Recent items. Apple menu > Recent Items lists documents you opened lately. Choose Clear Menu to empty it.
  • Go to Folder. Apple says Go to Folder offers recent pathnames as you type, so a path you used before can reappear.

If you mean lock your whole Mac

  • Press ⌃⌘Q to lock the screen right now. Apple lists it as the shortcut that locks your screen.
  • In System Settings > Lock Screen, set the password requirement after the screen saver or display sleep to Immediately. Apple names the setting "Require password after screen saver begins or display is turned off".
  • Turn on FileVault in System Settings > Privacy & Security so a stolen Mac cannot be read.

Apple notes that locking the screen does not stop other users from turning off the Mac, restarting it or logging in. FileVault needs your login password. If you lose both the password and the recovery key, Apple says your files and settings are lost forever. Read what FileVault is before you turn it on.

Where Hidden Folder fits

Frequently asked questions

What does the Locked checkbox do?

It marks the item so it cannot be changed, renamed or deleted from Finder. It does not stop anyone reading it.

How do I unlock a locked folder?

Select it, press ⌘I, and untick Locked. In Terminal use chflags nouchg with the path.

Does locking a folder stop an admin?

No. Administrators can change permissions and flags.

Is FileVault the same as locking a folder?

No. FileVault protects the whole disk when the Mac is off or at the login window. After you log in, your folders are open.

How do I lock a folder with a password?

Use an encrypted disk image. See the password protect guide.

Why can a locked item still end up deleted?

Apple says a locked document shows a warning when you move it to the Trash, and emptying the Trash deletes it. The lock is a speed bump, not a block.

Can another user account on my Mac open a folder I locked?

The Locked checkbox does not stop reading, so yes. Permissions set to No Access can stop it. Test with a Standard test account instead of trusting the setting.

References

Your files. Your Mac. Locked.

Coming soon. Join the waitlist and we email the link.

Get early access

The Mac beta opens soon

Hidden Folder is not released yet. Get the download link by email when it is.

One email when the beta opens. No spam. No account. We never sell your address.

Or follow it on GitHub