Migrating XCOM servers to Red Hat Enterprise Linux (RHEL) 8 and using XCOM for Linux 12.0.
The incoming file transfer is successful but a duplicate copy of that transferred file with a long name starting with "xc" is being created.
RHEL 8
XCOM for Linux 12.0
XCOM creates a temporary file name xc* during the file transfer process which is normally renamed to the designated remote filename at the end of the transfer.
The trace file provided shows the rename of the temporary file to the final file /home/xcomtest/inbound/test001.txt fails. It then copies the file instead but the removal of the temporary file also fails i.e. trace extract:
===
Xfclose: Closing file /home/xcomtest/inbound/xc0000112974890ljf5SqI
fsmachin.c 10619: Renaming /home/xcomtest/inbound/xc0000112974890ljf5SqI to /home/xcomtest/inbound/test001.txt
sdu.c 1437: Xrename: rename file </home/xcomtest/inbound/xc0000112974890ljf5SqI> to </home/xcomtest/inbound/test001.txt>
sdu.c 1445: Xrename: rename() returned -1, errno=13
sdu.c 1528: Xrename: Entering copy logic
sdu.c 1530: Xrename: open files </home/xcomtest/inbound/xc0000112974890ljf5SqI> and </home/xcomtest/inbound/test001.txt>
sdu.c 1388: Xunlink: Removing file </home/xcomtest/inbound/xc0000112974890ljf5SqI>
sdu.c 1393: Xunlink: Error removing /home/xcomtest/inbound/xc0000112974890ljf5SqI
sdu.c 1394: Xunlink: unlink() returned -1, errno=13
sdu.c 2114: Xrename: coctnum <2> ioctnum = 420 umask = 022
sdu.c 1635: Xrename: chmod() returned 0, errno=13
SetQEntryStats: Working with entry 000011
SetQEntryStats: Completed successfully
fsmachin.c 3730: Statistics is set successfully.
===
It was found that SELinux was preventing "xcomtcp" from renaming the file.
This was confirmed by reviewing the /var/log/messages file using this command to locate the error message:
grep "SELinux is preventing" /var/log/messages
Issuing the command "ls -lZ" showed differences in the SELinux context on the target file system between servers where the temporary file is being removed and not being removed.
The internal Unix team resolved the differences on the non-working servers.