Remotely initiated transfer and received file umask/permissions with XCOM
search cancel

Remotely initiated transfer and received file umask/permissions with XCOM

book

Article ID: 28279

calendar_today

Updated On:

Products

XCOM Data Transport XCOM Data Transport - Windows XCOM Data Transport - Linux PC

Issue/Introduction

Have modified the UMASK parameter in the local $XCOM_HOME/config/xcom.glb file.
However for a remotely XCOM initiated send file transfer which uses the CREATE option the received file that is created does not have its umask/permissions set to that UMASK value.

Environment

  • XCOM™ Data Transport® for Windows
  • XCOM™ Data Transport® for UNIX/Linux PC

Cause

For an incoming send file transfer with file option CREATE, the UMASK value provided by the initiating system is overwriting any value set by the target system. It is not possible to force a particular UMASK setting this way on the target system.

Resolution

To ensure that the received file is created with the required umask on the target system a post-processing step needs to be used as follows:

  1. Enable the post-processing script xcompp in the xcom.glb file i.e. set parameter XPPCMD=$XCOM_HOME/cmd/xcompp and restart xcomd.

  2. At the end of xcompp add a chmod command to change the permissions of the received file (parameter $file) to the desired value, for example 664.
#       POSTPROCESS HERE !
chmod 664 $file
exit 0

Additional Information