Some dummy (me 🙂 ) did it.
Actually, I was attempting to mimick OS9’s ability to lock folders so that they can’t be moved or renamed. Occasionally someone inadvertantly moves the “Jobs” folder into the “To Archive” folder for example. I’d like to prevent this from happening. With OSX, when you Get Info on a folder, the Locked checkbox is grayed out. I was trying out the chflags command to see if I could accomplish it that way. Well, the folder (luckily I tried it on a test folder) can’t be moved or renamed now. Unfortunately nothing can be done to it really.
On a side note, the man page for chflags says the following flgas can be set:
archset the archived flag (super-user only)
opaque set the opaque flag (owner or super-user only)
nodump set the nodump flag (owner or super-user only)
sappnd set the system append-only flag (super-user only)
schgset the system immutable flag (super-user only)
sunlnk set the system undeletable flag (super-user only)
uappnd set the user append-only flag (owner or super-user only)
uchgset the user immutable flag (owner or super-user only)
uunlnk set the user undeletable flag (owner or super-user only)
archived, sappend, schange, simmutable, uappend, uchange,
uimmutable, sunlink, uunlink
aliases for the above
However, the uunlnk and sunlnk do not work (unrecognized command). Maybe if those worked then I could accomplish what I’m trying to do. Any idea why those flags can’t be set on OSX?
Comments are closed