How to Lock Files and Folders in Mac OS X
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 locking capability 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 Mac 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
- Select the file or folder you want locked from the Finder of the Mac
- Go to the File menu and choose “Get Info” (or hit Command+i)
- Look under ‘General’ and click the ‘Locked’ checkbox so that it’s selected, this will lock the file
- Repeat for other files and folders as necessary
- Close the Get Info window when finished
The files or folders will now be locked, preventing any changes from being made to the file.
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 Mac OS X
You can unlock a file in Mac OS X by reversing this process.
Just return to the Get Info section for a chosen file, and by unselecting the checkbox next to “Locked” through the same Get Info panel you will unlock the file.
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.
Once the file is unlocked, it can be modified or deleted again.
lock unlock multiple files,
select all files or folders
select cmd+option+i
in the info dialog box select lock or unlock
all files will be locked or unlocked
also possible for “hide extension” or not
the type of keyboard can make this tricky (querty-azerty),
in that case use a virtual keyboard
Locking the file/folder will prevent changes, but if it is deleted, a message will appear saying that āit is locked, do you still want to move to trash?ā You can then empty the trash and your locked file/folder will be gone.
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.
I noticed the same thing. Try just locking the file, then the folder.
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…
This only prevents changes being made to the file.
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
This does not work, tried it and file still opens without a pw….