[
https://issues.apache.org/jira/browse/NIFI-7177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17047439#comment-17047439
]
Jens M Kofoed commented on NIFI-7177:
-------------------------------------
I have the same problem. Both with GetSFTP and FetchSFTP.
I have installed OpenSSH for Windows on a Windows 10 machine as a workaround
since there are no GetSMB process.
I can from the nifi server, log in manually to the windows machine by sftp.
doing it manually I have no problem deleting files on the sftp server.
>From NiFi, I can list and fetch files from the sftp server with no problems.
>If I select the fetchSFTP process should delete files as completion strategy
>it fails. The same error happens if I use the GetSFTP.
In both cases the message are the same: Insufficient permissions to delete file
But doing it manually from the nifi server with sftp, as the same user (have
tested both username/password and username/certificate) there are no problems
deleting files
FetchSFTP[id=8b367f29-0170-1000-83ee-adc6e3d99de5] Successfully fetched the
content for
StandardFlowFileRecord[uuid=7773d0e7-66dc-4784-9b1e-c1ee0ce32d6c,claim=StandardContentClaim
[resourceClaim=StandardResourceClaim[id=1582883828836-1, container=default,
section=1], offset=563248,
length=51200],offset=0,name=cf100e6d-c58e-4c76-8aba-b7cd1cd127d7,size=51200]
from 192.168.50.118:22./cf100e6d-c58e-4c76-8aba-b7cd1cd127d7 but failed to
remove the remote file due to Insufficient permissions to delete file
./cf100e6d-c58e-4c76-8aba-b7cd1cd127d7 from remote SFTP Server:
GetSFTP[id=8b3d126a-0170-1000-f67e-d440ed4ca405] Failed to remove remote file
035baae1-c895-4ec1-9825-8e8650af2609 due to Insufficient permissions to delete
file 035baae1-c895-4ec1-9825-8e8650af2609 from remote SFTP Server; deleting
local copy: org.apache.nifi.processors.standard.util.PermissionDeniedException:
Insufficient permissions to delete file 035baae1-c895-4ec1-9825-8e8650af2609
from remote SFTP Server
> getSFTP can't delete a original file.
> -------------------------------------
>
> Key: NIFI-7177
> URL: https://issues.apache.org/jira/browse/NIFI-7177
> Project: Apache NiFi
> Issue Type: Bug
> Components: Core Framework
> Affects Versions: 1.10.0, 1.11.0, 1.11.1, 1.11.2
> Reporter: Sook Plengchan
> Priority: Critical
>
> Below is error message.
> ------------------------------------
> 2020-02-21 17:52:47,463 ERROR [Timer-Driven Process Thread-2]
> o.a.nifi.processors.standard.GetSFTP
> GetSFTP[id=615e1b8c-0170-1000-a265-547a6116dc45] Failed to remove remote file
> /TEST/test.ssm due to java.io.IOException: Failed to delete remote file
> /TEST/test.ssm; deleting local copy:
> java.io.IOException: Failed to delete remote file /TEST/test.ssm
> at
> org.apache.nifi.processors.standard.util.SFTPTransfer.deleteFile(SFTPTransfer.java:394)
> at
> org.apache.nifi.processors.standard.GetFileTransfer.onTrigger(GetFileTransfer.java:211)
> at
> org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
> at
> org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1176)
> at
> org.apache.nifi.controller.tasks.ConnectableTask.invoke(ConnectableTask.java:213)
> at
> org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:117)
> at org.apache.nifi.engine.FlowEngine$2.run(FlowEngine.java:110)
> at
> java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
> at
> java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
> at
> java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
> at
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
> at
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
> at java.base/java.lang.Thread.run(Thread.java:834)
> Caused by: net.schmizz.sshj.sftp.SFTPException: Failure
> at net.schmizz.sshj.sftp.Response.error(Response.java:140)
> at net.schmizz.sshj.sftp.Response.ensureStatusIs(Response.java:133)
> at
> net.schmizz.sshj.sftp.Response.ensureStatusPacketIsOK(Response.java:125)
> at net.schmizz.sshj.sftp.SFTPEngine.remove(SFTPEngine.java:205)
> at net.schmizz.sshj.sftp.SFTPClient.rm(SFTPClient.java:125)
> at
> org.apache.nifi.processors.standard.util.SFTPTransfer.deleteFile(SFTPTransfer.java:386)
> ... 12 common frames omitted
> ----------------------------------------
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)