XCOM and USS file permissions For Executable Files
search cancel

XCOM and USS file permissions For Executable Files

book

Article ID: 117190

calendar_today

Updated On: 07-18-2024

Products

XCOM Data Transport XCOM Data Transport - Windows XCOM Data Transport - Linux PC XCOM Data Transport - z/OS

Issue/Introduction

This is the definition of how UMASK support works in our online documentation.

UMASK 
The file permissions that are removed from the XCOM default file or directory permissions for USS files or directories. UMASK is used only when a file or directory is being created. 
Range: 000 to 777 
Default: 022 

On z/OS systems, the XCOM default file permission is 666, which means: 
■ Allow the owner of the file to read and write the file. 
■ Allow members of the owners group to read and write the file. 
■ Allow all other users read and write the file. 

File permissions on USS files are implemented the same way as file permissions are on UNIX systems. The three basic permissions for each of the categories are read, write, and execute, commonly seen as rwx rwx rwx. 

If each of these characters (r, w, x) is considered as a bit, then the possible value ranges are as follows: 
■ 000 to 111 in binary 
■ 0 to 7 in hex 

So the default permissions of 666 (110 110 110) mean allow read and write to everyone, but not execute. 

The UMASK value identifies the permissions that you want to remove from the default (666). If you remove 022 (000 010 010) from 666, what remains is 644. 644 means: 
■ Allow the owner of the file to read and write the file. 
■ Allow members of the owners group and all other users to read, but not write. 

Notes: 
■ For directories—XCOM Data Transport sets permissions for a created directory to 7xx, no matter what owner UMASK value was specified. Group and other permissions, of xx, represent the permissions with the specified UMASK removed. 
■ For files – While the file is being transferred, XCOM Data Transport sets permissions for a created file to 6xx. Where xx represents the permissions with the specified UMASK removed. After the transfer has been completed, XCOM Data Transport sets the owner permission with the specified UMASK removed. 
 

We are using XCOM for z/OS 12.0 to transmit USS files from one system to another. I read in the reference guide that the default permission settings for files is 6xx and that we can use UMASK to modify these. The problem we're having is that these are executable files and actually need to be set to 755. This is not working.

Environment

XCOM™ Data Transport® for z/OS

Resolution

The current UMASK support was introduced in XCOM for z/OS 11.5. 

Apparently there are two kinds of UMASK support -  

  • The symbolic form specifies what can be set, what is allowed 
  • The numeric (octal) values specifies what cannot be set, what is disallowed. 


XCOM only supports the numeric UMASK however.   

We cannot change how it is working right now because other customers are using it the way it is.  The only way to fix this would be an enhancement.

Here are two possible workarounds:

  • A two step job.  Step one is the file transfer.  Step two is a sendjob to issue a CHMOD to correct the permissions.    or 
  •  Implement EXIT01 to correct the permissions.

Additional Information

Here is an IBM knowledge doc about this:
Setting the File Mode Creation Mask