UC4 Filetransfer & Owner, Owner Group and Permissions
search cancel

UC4 Filetransfer & Owner, Owner Group and Permissions

book

Article ID: 88770

calendar_today

Updated On:

Products

CA Automic Workload Automation - Automation Engine CA Automic One Automation

Issue/Introduction

Error Message: Owner, owner group and permissions of a destination file for versions including and after UC4 V9 Filetransfer (FT 2)
 
General
 
This is about owner, owner group and permissions (rights for user, group and world) of a destination file after Automic V9 (which includes v10, 11.x, 12.x, and 21.0) Filetransfer. It explains also the possibilities to change them if not the required ones are set.
This is only vaild if the agent runs with root permission: Agents binary owner is root and the s-bit is set! As recommended in the installation manual:
 
A) The file owner is set to the user, specified in the destination login object.
E.g.: Is the user "automic" is set in the login object; the owner will become "automic" too.

 
B) The file owner group is set to the default group of the user specified in the destination login object.
E.g.: If the default group of the "automic" is "support", the owner group will become "support" too.

 
C) The permissions are set following the system default umask:
 
E.g.: Eg default umask "0022", the Unix system will determine the following permissions:
 
 0666
-0022
=====
 0644 (which is " -rw-r--r--")

Environment

Component: UNIX/Linux Agent

Resolution

Solution
Changing owner, owner group and / or permissions:
a) The owner of the file can be set for each file transfer as needed, by using a destination login object which contains the requested user.
 
b) There is no possibility to change the owner group via a setting within Automic - Changing the primary group of the user on Unix might be no acceptable solution.
 
c) There is no possibility to change the permissions via a setting within Automic.
 
Best practice is, changing owner group and / or permissions after the Filetransfer, if necessary. The easiest way is, to use the post-process tab of the file transfer object.
I've attached an example as xml-export, please have a look at it; here an explanation how it works:

In the "Variables & Prompts" tab different parameters for the destination are set:
&DEST_AGENT#
Name of destination agent, which is used for the transfer and for the owner group and permissions change via post-process.
&DEST_FILE#
Destination path and file name(s) for the transfer - the owner group and permissions of this file(s) will be changed after the transfer finished.
&DEST_GROUP#
Owner group which should be set.
Note: The file owner (set via login object) must be allowd to change the owner group this value!
&DEST_LOGIN#
Login object for transfer and for the owner group and permissions change.
&DEST_PERMISSION#
Permissions which should be set.
 
In the "Post-Process" tab a so called "Prep_Process UNIXCMD" job is submitted, which runs a "chgrp" and "chgmod" command.
 
Note: This procedure will also work for wildcard Filetransfer. It may happen, that files which were in the destination directory before the transfer, are change too if the file name fits to the wildcard.

Attachments

1558536253662000008445.zip get_app