Hitachi

Job Management Partner 1 Version 10 Job Management Partner 1/Advanced Shell Description, User's Guide, Reference, and Operator's Guide


umask command (sets the access permissions for creating a new file) (UNIX only)

Organization of this page

Format

umask  [-S] [mask]

Description

This command sets the access permissions used when a new file is created. You specify in mask the file mode creation mask that is to be set. If the command is executed with mask omitted, it outputs the current umask value to the standard output.

Arguments

-S

Specifies that the value is to be set or output in symbolic format.

When the -S option is specified, the command sets or outputs the file mode in symbolic format. When the -S option is not specified, the access permissions that are set or output are expressed in octal. This specification also indicates when the specified access permissions are not granted at file creation time.

mask

Specifies a umask value to serve as the default file mode when a file is created. You can specify mask in numeric or symbolic format. If you use symbolic format, the specification follows the format [who][op][perm][,...]. You can specify multiple sets of values delimited by the comma (you cannot use the space).

  • who

    Specifies the targets for which the mask is set. Specify none, one, or multiple of the following letters:

    u: Permissions for the user (owner)

    g: Permissions for the group

    o: Permissions for others

    a: Permissions for all (a=ugo)

    (none): Permissions for all (a=ugo)

  • op

    Specifies the mask setting operation. Specify one of the following symbols:

    +: Add perm to the current mask for each who entry

    -: Remove perm from the current mask for each who entry

    =: Change the current mask for each who entry to perm

  • perm

    Specifies the permissions to be granted at the time of file creation. Specify none, one, or multiple of the following letters:

    r: Read permission

    w: Write permission

    x: Execute permission

    u: Same permissions as for the user

    g: Same permissions as for the group

    o: Same permissions as for others

    X: If any of ugo has the execute permission, grant those execute permissions. If none of ugo have execute permissions, no permissions are set. If no permissions are set, nothing changes when op is + or -, but the mask for who is removed when op is =.

    s: No permissions. Nothing changes when op is + or -, but the mask for who is removed when op is =.

    (none): No permissions. Nothing changes when op is + or -, but the mask for who is removed when op is =.

Return codes

Return code

Meaning

0

Normal termination

1

Error termination

Notes

Usage example