How to Lock Files and Folders in Mac OS X

Aug 11, 2010 - 5 Comments

Finder You can easily prevent changes being made on any files or folders in Mac OS X by locking the file or folder in question. This will also prevent the file or directory from being deleted, since the Trash will not empty while a file is in a locked state.

Locking files and folders in OS X is quite easy, and the process is the same in all versions of the Mac operating system. You’ll obviously want to know the file(s) or directories you wish to lock down ahead of time, then proceed with the following instructions.

Locking a File or Folder on the Mac to Prevent Changes & Deletion

  1. Select the file or folder you want locked from the Finder of the Mac
  2. Go to the File menu and choose “Get Info” (or hit Command+i)
  3. Look under ‘General’ and click the ‘Locked’ checkbox so that it’s selected, this will lock the file
  4. Repeat for other files and folders as necessary
  5. Close the Get Info window when finished

The files or folders will now be locked, preventing any changes from being made to the file.

lock file to prevent changes

If a file or folder is locked, it will also cause an alert dialog to popup if you try and delete it, saying “Item ___ is locked. Do you want to move it to the Trash anyway?”

Note this locks the file from changes and removal, but it does not password protect a file or folder like this image trick does.

Unlocking a File or Folder in OS X

You can unlock a file in Mac OS X by reversing this process and unselecting the checkbox next to “Locked” through the same Get Info panel.

Do note that if you are trying to unlock a file that you do not have privileges to you will need the admin password for that Mac.

Enjoy this tip? Subscribe to the OSXDaily newsletter to get more of our great Apple tips, tricks, and important news delivered to your inbox! Enter your email address below:

Related articles:

Posted by: Paul Horowitz in Mac OS X, Tips & Tricks


» Comments RSS Feed

  1. bijan says:

    Reversing the process does not work for unlocking in Snow leopard. I have even rebooted the laptop and still cannot unlock the folders and files.

    Can anyone help me?

    Thank you

  2. bramofon says:

    This only prevents changes being made to the file.

  3. Peter says:

    If i lock an folder on external disk by this way and i will get an encrypting virus, will it encrypt the folder as well? Under admin user…

  4. Derek says:

    When I lock a folder on my desktop, I am unable to drag files into it or save files to the folder. This is very strange. I want the folder locked so that I don’t accidentally delete it, but I obviously want to still be able to save files to it. Does anyone know why I’m having this issue? I am unable to find an answer. Thanks.

Leave a Reply


Shop for Apple & Mac Deals on

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates

Recent Posts