UDM - File Permission Attribute
File Permission Attribute
Under the UNIX operating system, the File Permission (mode) attribute specifies the mode (in UNIX parlance), or file permissions, of a file created by UDM in a copy operation. Existing files do not have their modes modified by UDM. They retain the file mode that they had before the copy operation was initiated.
Note
The mode attribute is set using the attrib command.
The value of mode is either a set of three numbers, or nothing. Each number in the set corresponds to one or more individuals for whom access is granted for the file:
First number | Owner of the file. |
Second number | Users in the group assigned to the file. |
Third number | Everyone else. |
The value of each number is the sum of values representing file permissions:
0 | No permissions. |
1 | Permission to execute the file. |
2 | Permission to write to the file. |
4 | Permission to read from the file. |
Thus, a value of 7 for the first number would provide the file owner with permission to read, write, and execute a file. A value of 6 for the second number would provide users in the group assigned to the file with permission to read from the file and write to the file, but not to execute the file. A value of 0 for the third number would provide everyone else with no permissions for the file.
By default, the mode attribute is not set. The default mode of a newly created file by UDM is dependent upon the umask attribute or the mode of the source file in a UDM transfer.
Examples
The following example provides the owner, group, and everyone else permission to read, write, and execute the file:
attrib local mode=777
The following example provides the owner permission to read, write, and execute the file; members of the file's group permission to read and execute the file; and everyone else no permissions.
attrib local mode=750
The following example provides the owner permission to read and write the file; and no permissions to the file's group and everyone else.
attrib local mode=600
Defaults
By default, the mode attribute is not set.
The default mode of a newly created file by UDM is dependent upon either:
- umask attribute.
- Mode of the source file in a UDM transfer.
The latter case comes into play if both the source and destination instances of UDM are:
- Version 3.2 or greater.
- Running under some form of the UNIX operating system or its derivatives (such as Linux).
The umask attribute is used in specifying the mode if a UDM version prior to 3.2.0 is involved in the transfer. Version 3.2.0 (and greater) versions can be changed to behave this way as well by setting the mode attribute to 0 on the destination side of the transfer.
For example:
attrib dest_logical_name mode=0
Note
Relying solely on the umask attribute may not always produce the results expected, since it relies on a file's existing permissions. For complete control over file permissions, Stonebranch recommends using the mode attribute whenever possible.