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 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
- 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 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.