KB Article #68517

Ownership and permissions setting of received files in Transfer CFT 2.7.0

Problem

-Ownership and permissions setting of received files in Transfer CFT
-Transfer CFT v 2.7.0
-Relevant Parameter: USERID in CFTRECV and USERCTRL in CFTPARM


Resolution

The new feature in Transfer CFT 2.7.0 allows allocating received file under a known/defined userid (using that userid rights/ mode (e.g. 777,664 etc) accordingly) at receiver end. There is no support to allocate the file automatically with the same permission/ownership as set for the source file.



The below setup steps can be used to achieve the objective:
(1) The CFTPARM must be set with USERCTRL=YES to allow the surrogate on file access (see also the documentation for prerequisite regarding that functionality)
(2) CFTRECV must be set with a known userid in the USERID= that can be any of the transfer variables when needed
Note: SUSER and RUSER are 'free' transfer variables; do not assume SUSER will be set with the sender userid.
For e.g:
CFTSEND id=groupfile, wfname=/DATA1/&idtu, fname=@/DATA1/WEB/*
CFTRECV id=groupfile, wfname=/DATA4/&idtu, fname=/DATA4/WEB, USERID=&PART/ &SUSER/ &RUSER
(3) Also for UNIX: special rights must be given for CFTSUD processes by:
(a) Setting uconf parameter cft.unix.cftsu.isservice to no (i.e. cftutil UCONFSET ID= cft.unix.cftsu.isservice,VALUE=NO)
(b) Setting uconf parameter cft.unix.cftsu.afunix to $(cft.runtime_dir)/run/SCFTSU (i.e. cftutil UCONFSET ID= cft.unix.cftsu.afunix,VALUE=$(cft.runtime_dir)/run/SCFTSU)
(c) Changing file system properties with:
chown root:root $CFTDIRINSTALL/bin/CFTSUD
chmod u+s $CFTDIRINSTALL/bin/CFTSUD



Thereafter a file can be sent as below and the received files permission and ownership would be that of the user specified in USERID parameter of CFTRECV:
CFTUTIL SEND part=<partner>, idf=groupfile