2 Replies Latest reply: Sep 14, 2005 10:26 PM by biovizier
John Hough Level 1 (10 points)
On OS 9.3, I was able to lock a folder on the desktop by selecting the folder, get info and then click the "lock" box there. On OS10.3.8, when I do this, there is a box that says"locked", it is greyed out, so I have no idea of how to lock a folder, any hints
  • Chopsuey Level 4 (1,945 points)
    Hi John,

    What you can do in OS X is to change the
    permissions of the folder.

    Do a command i on it. Under the large
    icon you'll see "Ownership and Permissions"
    You can change it to "Read Only" if that is
    what you want or "No Access" to lock others

    - Chops
  • biovizier Level 5 (7,925 points)
    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.