mercredi 25 février 2015

python paramiko giving error "Permission denied [Errno 13]" on windows server on using sftp

trying to download some files from windows server using sftp in paramiko. get method is:



def get(self, remotepath, localpath = None):
"""Copies a file between the remote host and the local host."""
if not localpath:
localpath = os.path.split(remotepath)[1]
self._sftp_connect()
self._sftp.get(remotepath, localpath)


On running the script as sshObj.get('C:\\my_file.txt', 'D:\\python\\'), it throws the error :



File "C:\Py34\lib\site-packages\paramiko\sftp_client.py", line 806, in _convert_status
raise IOError(errno.EACCES, text)`PermissionError: [Errno 13] **Permission denied**`


I have given all the permissions to the folder. also shared it with other users. But still the error is there. Any leads if anyone has faced this before will be helpful.


Note: I installed freesshd to make my localbox an ssh server.


Aucun commentaire:

Enregistrer un commentaire