.CHOWN, Utilities, Unix-like VMS chown Facility&CHOWN - Unix-like VMS 'chown' Facility$(c) Copyright 1991-1996, Chris OliveN------------------------------------------------------------------------------NAs with most utilities, CHOWN was created out of necessity. I wanted toNchange the ownership of INDEXF.SYS and QUOTA.SYS once, and wouldn't take 'No!'Nfor an answer. So CHOWN was born. Since these files, INDEXF.SYS andNQUOTA.SYS, are locked, SET FILE/OWNER= won't cut it -- CHOWN works in placesNwhere SET FILE/OWNER just won't. And not wanting to write a hack when I mightNneed the same functionality on something else down the line, I generalized theNfunctionality into this utility. It's called 'chown' not because I like UnixN(but if I weren't running VMS, I'd probably run Unix -- anything but thatNpretender Windoze and MS-DUM...) but that's just what I named it, okay?GActually, the parameters CHOWN requires are much like Unix, that's why:(Syntax: CHOWN rights-id-string filespecNThe 'rights-id-string' is the name of a rights identifier on the system.NSince every user has (should have!) a rights identifier associated with hisNname, CHOWN can be used to set the ownership of a file(s) to any user on theNsystem. If you have by chance *removed* the associated rights id string for aNuser, then this utility makes you pay for such an ignorant move -- you won'tNbe able to use CHOWN! Base resource numbers inside brackets (i.e. [1,4] forNSYSTEM) and bracket delimited rights id strings (i.e. [SYSTEM] for SYSTEM)NWILL NOT WORK! DON'T USE BRACKETS! Also, CHOWN handles what 'chown' andN'chgrp' do on Uglix since VMS doesn't allow the same rights id string to beNgranted to two different group UIC strings (e.g. you can't have anN[ORDER,FOO] and a [SALES,FOO] in VMS). So the 'rights-id=string' is all that8is needed and it doesn't need brackets, just like Uglix.NThe 'filespec' is exactly what a filespec is in any other VMS facility orNutility. CHOWN can change to the ownership of all files that match a wildcardfilespec, including [...]*.*;*NFor you curious more technical types out there, CHOWN works using the ACP-QIONinterface. You need a FIB and an ATR (attribute) item list; you fill the FIBNwith a file's file id (FID); and, with a channel assigned to the file'sNdevice, $QIO using IO$MODIFY. Magic. Poof. New owner. Locks? What locks?N(The ATR item list tells $QIO to change the file's owner to the UIC you specify).%That's about it. Happy 'chown'ing...N------------------------------------------------------------------------------ Chris Olive%...still a VMS programmer at heart...73740.1636@compuserve.com