141 Views 2 Replies Latest reply: Sep 14, 2005 10:26 PM by biovizier
I find it strange that OS X no longer provides a GUI for locking and un-locking folders, while allowing it for files.
Apparently the "lock" in OS X actually refers to the 'uchg' file system attribute, which isn't quite the same as a "lock" in pre-OS X systems (I'm not sure exactly how they differ technically). Regardless, there are a few ways to "lock" a folder in OS X.
One way is to use "AppleScript" - for example, open "/Applications" > "AppleScript" > "Script Editor.app", paste in this line and hit ⌘R:<pre>tell application "Finder" to set locked of (choose folder) to "true"</pre>Using "Terminal.app", a folder can also be locked or unlocked respectively using these commands:<pre>chflags uchg "/path/to/folder"
chflags nouchg "/path/to/folder"</pre>The behaviour of "locked" items is slightly different in OS X compared to System 9 and earlier. Before, a locked item could be moved but not modified. In OS X, in addition to the fact that items in the top level of a locked folder can't be modified (though nested folders can), the locked folder itself cannot be moved from its enclosing folder.