[mod.computers.vax] Quota Setup

zar@XHMEIA.CALTECH.EDU (Perfect Tommy) (09/15/86)

This is a method I've implemented on a few uVAXIIs that works well. It isn't
perfect, but I think it'll do what you want (I also think this is of general
interest because the uVAXII manuals are short on examples).
	$ RUN SYS$SYSTEM:AUTHORIZE
	UAF> ADD/IDENTIFIER/ATTRIBUTE=RESOURCE SCRATCH
	UAF> GRANT/IDENTIFIER/ATTRIBUTE=RESOURCE SCRATCH usera
(line 1 creates a identifier that will actually be the owner of all scratch
files on the same disk as your user files. You must then use line 2 to
give all users on your system this new identifier so they may be allowed
to use scratch disk area. You must also add line 2 to your own ADDUSER
procedure whenever you create a new user so the new user is also allowed
to use the scratch area. You cannot specify a wild card for "usera" to
grant SCRATCH to all users.)
	UAF> EXIT
	$ RUN SYS$SYSTEM:DISKQUOTA
	DISKQ> USE disk:
	DISKQ> ADD [SCRATCH]/PERM=500000
	DISKQ> EXIT
	$ CREATE/DIRECTORY/OWNER=SCRATCH/PROTECTION=W:RW disk:[SCRATCH]
(the create command will create a root directory from which all users
will create subdirs to contain their scratch files. We added a permanent
disk quota for the identifier SCRATCH which should be the MAXIMUM amount
of disk blocks the total scratch area will need for all users on the
system.)
	$ ASSIGN/SYSTEM/EXECUTIVE_MODE/TRANSLATION=(CONCEALED,TERMINAL) -
	  physical_disk_name:[SCRATCH.] TMP
(the above assignment must be typed in as well as added to SYS$MANAGER:-
SYSTARTUP.COM so your system boot procedure also executes this line. All
users will call their scratch area TMP:[username].)
	$ USR := 'F$GETJPI(0,"USERNAME")'
	$ TST := disk:[SCRATCH]'USR'.DIR
	$ IF "''F$SEARCH(TST)'".EQS."" THEN CREATE/DIRECTORY TMP:['USR']
(the above three lines should be inserted into SYS$SYLOGIN procedure so
that each user checks to make sure they have a scratch disk directory
before logging in)
						From The Great
						     Zar
						a.k.a. Dan Zirin