Making /PROTECTION=O:RWED the default for CREATE/DIRECTORY.

VMS protects you from accidentially deleting a directory file: all the .DIR files created with create/directory by default lack the D (delete) bit in the protection masks. For some users who know - or think to know - what they do, this is annoying, as they have to do some extra work to delete the directory file. (Admitted, there is a new "feature" on 8.4 which enables every user to delete a directory file, no matter what the protection bits are!) The extra for power users is to grant themselves a powerful privilege. Others may use a symbol "cre*ate" with a value of "create/protection=o:rwed" - which is in conflict with create/terminal, or a specific symbol for creating just directories "credir". But there is another possible simple solution - for all: change create.cld to make "/protection=o:rwed" the default for "create/directory". That's all what these patches are about.

Presumed you know what to do with a CLD file, all you need to change is the create.cld file, which ships with VMS and resides in sys$update. The downloadable patches show what needs to be changed for Alpha V8.3 and I64 V8.4. It is obvious what you have to do for other versions of/platforms for VMS. The .patch file can be applied with the (GNV/GNU/Unix) patch utility, the .upd files can be applied with the SUMSLP utility.

Still using VAX and VMS V7.3? For VAX/VMS the CLD files are not supplied with the OS. You need a toool like VERB to extract the command definitions, like $ VERB CREATE/OUTPUT=CREATE.CLD. Then apply the .upd file with the SUMSLP utility.

Once you understand how this is accomplished, you can taylor the default protection for other owners as well. Feel free to add your name to the comment section of the CLD file.

Get the patches: create.zip.


Example, without the patch:
$ cre/dir [.demo]
$ dir/sec demo.dir

Directory DISK$USER:[USER]

DEMO.DIR;1           [USER]                       (RWE,RWE,,E)

Total of 1 file.
$ del demo.dir;
%DELETE-W-FILNOTDEL, error deleting DISK$USER:[USER]DEMO.DIR;1
-RMS-E-PRV, insufficient privilege or file protection violation
$ set prot=o:rwed demo.dir
$ del demo.dir;
$ 

Example with the patch:
$ set command create.cld
$ cre/dir [.demo]
$ dir/sec demo.dir

Directory DISK$USER:[USER]

DEMO.DIR;1           [USER]                       (RWE,RWED,,E)

Total of 1 file.
$ del demo.dir;
$