FTP job failing with Permission denied.

book

Article ID: 209599

calendar_today

Updated On:

Products

CA Automic Workload Automation - Automation Engine CA Automic One Automation

Issue/Introduction

FTP job fails with Permission denied. Once the same FTP job is restarted all files are transferred.

2021-02-02 02:05:35             copied: /Folder/Filename.xml  - 301244 bytes sent in 1.96 Seconds 153.14 Kbytes/sec.
2021-02-02 02:05:35             1 files transferred, 7 not processed - 301244 bytes sent in 65.40 Kbytes/sec
2021-02-02 02:05:35             Disconnecting from FTP.SERVER port 22
2021-02-02 02:05:35             Disconnecting from FTP.SERVER port 22
Permission denied
com.uc4.ftpjob.DataTransferException: Unable to open file /Folder/Filename.xml for output on system CONN.FTP.
	at com.uc4.ftpjob.commands.impl.CopyCommand.throwDataException(CopyCommand.java:705)
	at com.uc4.ftpjob.commands.impl.CopyCommand.execute(CopyCommand.java:613)
	at com.uc4.ftpjob.commands.ThreadPoolJobExecutor$ThreadRunner.run(ThreadPoolJobExecutor.java:86)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:748)
Caused by: com.uc4.ftpjob.DataTransferException: Permission denied
	at com.uc4.ftpjob.commands.SFtpCommandImpl.getOutputStream(SFtpCommandImpl.java:269)
	at com.uc4.ftpjob.commands.FtpFacadeCommandImpl.getOutputStream(FtpFacadeCommandImpl.java:106)
	at com.uc4.ftpjob.commands.impl.CopyCommand.execute(CopyCommand.java:602)
	... 6 more
Caused by: 3: Permission denied
	at com.jcraft.jsch.ChannelSftp.throwStatusError(ChannelSftp.java:2579)
	at com.jcraft.jsch.ChannelSftp.put(ChannelSftp.java:693)
	at com.jcraft.jsch.ChannelSftp.put(ChannelSftp.java:652)
	at com.jcraft.jsch.ChannelSftp.put(ChannelSftp.java:649)
	at com.uc4.ftpjob.commands.SFTPHelperDelegate.put(SFTPHelperDelegate.java:251)
	at com.uc4.ftpjob.commands.SFtpCommandImpl.getOutputStream(SFtpCommandImpl.java:265)
	... 8 more

Cause

Possible jsch version in this FTP solution (0.1.53).

Environment

Release : 4.0.2

Component : RA FTP Solution

Resolution

This does not occur with the latest FTP solution 4.09 utilizing jsch 0.1.54.

2021-02-11 03:09:09             sftp channel opened
2021-02-11 03:09:12             copied: /Folder/Filename.xml  - 67274 bytes sent in 2.86 Seconds 23.46 Kbytes/sec.
2021-02-11 03:09:13             copied: /Folder/Filename2.xml  - 302973 bytes sent in 2.87 Seconds 105.56 Kbytes/sec.
2021-02-11 03:09:15             copied: /Folder/Filename3.xml  - 54 bytes sent in 2.69 Seconds 0.02 Kbytes/sec.
2021-02-11 03:09:15             copied: /Folder/Filename4.xml  - 857 bytes sent in 2.71 Seconds 0.31 Kbytes/sec.
2021-02-11 03:09:18             copied: /Folder/Filename5.xml  - 36293 bytes sent in 2.43 Seconds 14.89 Kbytes/sec.
2021-02-11 03:09:18             copied: /Folder/Filename6.xml  - 231675 bytes sent in 2.42 Seconds 95.37 Kbytes/sec.
2021-02-11 03:09:20             copied: /Folder/Filename7.xml  - 46424 bytes sent in 2.06 Seconds 22.51 Kbytes/sec.
2021-02-11 03:09:21             copied: /Folder/Filename8.xml  - 369631 bytes sent in 2.83 Seconds 130.51 Kbytes/sec.
2021-02-11 03:09:21             8 files transferred - 1055181 bytes sent in 84.32 Kbytes/sec