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.