Pragma Systems Technical Forum

003:ERROR: Couldn't get handle: Permission denied

https://forums.pragmasys.com/Topic297.aspx

By tlockhart - 5/22/2015 9:46:58 AM

When attempting to transfer files between servers with the SFTP command and mput commands.  I am repeatedly receiving the permission denied error below, which then ends with a closed connection.  Sometimes files are transmitted successfully, but when this error occurs the files are lost.  I have attached a sample set of files as an example.  Can anyone tell me why I would be getting Permission denied error if there is no issue with the server.

--Starting SFTP log Fri May 22 10:00:01 2015
Connecting to xx.xx.xxx.xx...
-->cd E:\SFTP\Data\Customer\PeachCare\outbound
000:SUCCESS: Changed remote directory to /E:/SFTP/Data/Customer/PeachCare/outbound
-->lcd D:
000:SUCCESS: Changed local directory to D:
-->lcd D:\SFTP\Data\Customer\PeachCare\outgoing

000:SUCCESS: Changed local directory to D:\SFTP\Data\Customer\PeachCare\outgoing
-->mput *.*
003:ERROR: Couldn't get handle: Permission denied
--Starting SFTP log Fri May 22 11:00:02 2015
Connecting to xx.xx.xxx.xx...
007:ERROR: Connection Lost. Connection closed
By bethredd - 5/26/2015 4:08:18 AM

Hello,

The get handle error is returned by the server to the client, so the server is unable to return a valid file handle for writing due to a lack of permission to either the directory. 

Make sure your sftp user has write access to the directory E:\SFTP\Data\Customer\PeachCare\Outbout. If your user has list\read access they would be able to change directory, but would be unable to write to the directory. 

You might also try a single file upload to see if there is a file that already exists on the server that is not allowing the file to be rewritten.