Technical data

Using Files and Directories
10.5 Protecting Files
Examples
1.
$ SHOW PROTECTION
SYSTEM=RWED, OWNER=RWED, GROUP=RE, WORLD=NO ACCESS
The SHOW PROTECTION command displays the current default protection.
In this example, the response shows the system default protection, which
indicates that the system and owner have all types of access, group users
have read and execute access, and world users have no access.
2.
$ SHOW SECURITY IMAGES.DIR
DBA1:[SADAMS]IMAGES.DIR;1 object of class FILE
Owner: [SAM,SADAMS]
Protection: (System: RWE, Owner: RWE, Group: RE, World: E)
Access Control List:
(IDENTIFIER=[SAM,SADAMS],ACCESS=READ+WRITE+EXECUTE+DELETE+CONTROL)
In this example, the SHOW SECURITY command displays the current
protection associated with the file IMAGES.DIR.
3.
$ DIRECTORY/SECURITY IMAGES.DIR
Directory DBA1:[SADAMS]
IMAGES.DIR;1 [VMS,SADAMS] (RWE,RWE,RE,E)
(IDENTIFIER=[VMS,SADAMS],ACCESS=READ+WRITE+EXECUTE+DELETE+CONTROL)
Total of 1 file.
In this example, the /SECURITY qualifier with the DIRECTORY command
displays the current protection associated with the IMAGES.DIR file.
4.
$ COPY/PROTECTION=(SYSTEM:RW,OWNER:RWED,GROUP:RW,WORLD) ABC.DAT XYZ.DAT
In this example, the /PROTECTION qualifier specifies a protection code when
the ABC.DAT file is copied to XYZ.DAT.
5.
$ SET SECURITY/PROTECTION=(SYSTEM:RWE,OWNER:RWED,GROUP:RE,WORLD) ABC.DAT
In this example, the SET SECURITY/PROTECTION command changes the
protection for an existing file. The command gives the following instructions
regarding the file ABC.DAT: system users have read, write, and execute
access; the owner has read, write, execute, and delete access; group users
have only read and execute access; world users have no access.
Control access is implied and unchangeable for system and owner categories
but not for group and world.
Using Files and Directories 1017