chmod from hell? what does it mean to set owner to "-1" ??

I’m trying to send a Unix command-line instruction via SSH session to a server to make a specified folder so that it can’t be

• renamed
• deleted
• moved

but can still have stuff put into it, taken back out of it, renamed, etc etc etc., and furthermore that folders parallel to it can be created, renamed, or moved until/unless I do a similar permissions-setting on those folders as well. 1

I posed that question on an OS X board rife with Unix expatriates, but no one solved that one for me — but I think I’m on the right track now.

I can do what I want to do from the GUI of MacOS 9 if I mount the Server volume as “root”. See the checkbox labeled "Can’t move, rename, or delete this item (locked)?2 When checked (under root mount of volume), someone with the same volume mounted under an end-user username can open the folder, can create new folders within the folder, can drag-copy files into the folder or its newly-created subfolders, can delete stuff out of the folder, and so on.

Now, since I won’t want to AppleScript the process of mounting the server volume as root, and because at least some of the end users will be using MacOS X (the Finder of which has no such bleeping checkbox), I need to know what the hell the Unix OS of the Server is really doing in response to the MacOS 9 Get Info window when I close it.

So I fire up the old Script Editor and I set it to record while I do a Get Info and check the checkbox and then close the checkbox, and this is what Script Editor says I did:

tell application "Finder"
	select folder "AHunter3Test" of disk "production"
	open information window of selection
	set current panel of information window of folder "AHunter3Test" of disk "production" to Sharing panel
	close information window of folder "AHunter3Test" of disk "production"
	set owner of folder "AHunter3Test" of disk "production" to "-1"
end tell

Mind you, when I do a subsequent Get Info and open the Sharing panel for this folder again, the owner is still listed as “root”. Under OS X (GUI Get Info) Owner is root (access=read and write), Group is other (access=read and write), and Others = “read and write” as well.

XRay reports the permissions on the folder to be drwxrwxrwx, or chmod 0777, with no obscure options checked.

Anyone got a clue as to what, specifically, it is that has been done to this folder by checking that OS 9 Finder box and/or setting the owner of the folder to “-1”?


  1. The backstory is this, condensed version: there’s already a complicated and perfectly functioning AppleScript routine that creates an incredible raft of folders and subfolders with the desired name in the desired location. Don’t want to rewrite that whole mess in unix command-line-ese. Now they want some of the folders to be locked after being created. Folders will have been created with server vol mounted with enduser password. On MacOS 9 I can use MacSSH PPC, and on OS X the Terminal, to ssh to server as root to set permissions, even though in the GUI / on the Desktop the volume is mounted with enduser password, and that’s how I want to go about this — because logging off of a root ssh sessions is far and away more dependable than unmounting an AppleTalk share mounted as root using AppleScript — unmounting volumes is a very glitchy thing, misfires a lot, and every misfire would leave endusers with the server volume mounted as root, see?

  2. In case anyone overly familiar with OS 9 is wondering about that Get Info window, it is enhanced with Snitch but Snitch is not adding the checkbox, it only affects the stuff you see over on the right. Trust me, that checkbox is still there on a plain-vanilla MacOS 9 Get Info window.