Technical data
Using Files and Directories
10.5 Protecting Files
specify the proper protection both for the directory that lists the file
and for the file itself. See Section 10.5.4 for instructions on protecting
directories.
The following sections explain how to perform these tasks:
Task Section
Set default disk file protection Section 10.5.3.1
Set explicit disk file protection Section 10.5.3.2
Modify disk file protection characteristics Section 10.5.3.3
10.5.3.1 Setting Default Disk File Protection
A new file receives default UIC-based protection and the default access control
entries (ACEs), if any, of its parent directory. A new version of an existing file
receives the UIC-based protection and ACL of the previous version.
The protection of a renamed file is unchanged unless you use the
RENAME/INHERIT command.
How to Change Default UIC Protection
The operating system provides each process with a default UIC-based protection
of (S:RWED,O:RWED,G:RE,W). To change the default protection that is applied to
files created by that process, enter the SET PROTECTION/DEFAULT command
using the following format:
SET PROTECTION[=(code)]/DEFAULT
where:
code Defines the protection to be applied to the specified files. If you omit
the code, the access is set to the current default protection.
For example, if you place the following command in your login command
procedure, you grant all processes read and execute access to any files that
you subsequently create:
$ SET PROTECTION = (S:RWED,O:RWED,G:RE,W:RE)/DEFAULT
(Remember that you must execute the login command procedure for this
command to take effect.)
10.5.3.2 Setting Explicit Disk File Protection
You can explicitly specify UIC-based protection for a new file with the
/PROTECTION qualifier (valid with the BACKUP, COPY, RENAME, and
CREATE commands), as shown in the following command line:
$ CREATE MAST12.TXT/PROTECTION=(S:RWED,O:RWED,G,W)
After a file is created and you have created an ACL for the file, you can modify
the ACL and add as many ACEs to the ACL as you want. The protection specified
by the ACL overrides the UIC protection of the file.
The following examples show how to check and specify protection codes.
10–16 Using Files and Directories










