'Permission Denied' Error when getting a file via SFTP 'Permission Denied' Error when getting a file via SFTP unix unix

'Permission Denied' Error when getting a file via SFTP


Couldn't get handle: Permission denied

"Couldn't get handle" means the sftp client couldn't get a handle to the remote resource. The resource in this case is the file which you're trying to get. "Permission denied" is a standard message meaning that your remote user ID doesn't have permission to access the file in question.

As you noted in a comment:

the file i'm trying to get on the remote box is: -rwxrwx--- and 'userB' does not belong to the group of that file's owner.

so "userB" in fact doesn't have permission to read the remote file.


Try setting permissions to 755 (-rwxr-xr-x) on the user's home directory.


Same problem, lack of read Permission ,I was trying download a certs.What I did is cp the file I want to download to users directory and set permissions to 777(755 is ok as mentioned)chmod 777 filepath, then I can download it .