mar10 / pyftpsync

Synchronize directories using FTP(S), SFTP, or file system access.
https://pyftpsync.readthedocs.io
MIT License
117 stars 25 forks source link

550 permission denied #55

Closed guisz1 closed 3 years ago

guisz1 commented 3 years ago

on syncronize to a server with filezilla work, but when i use ftpsync thats a error is growing

guilherme.zulian@FPTI-023928:~$ python3 t.py 
INFO:keyring.backend:Loading KWallet
INFO:keyring.backend:Loading SecretService
INFO:keyring.backend:Loading Windows
INFO:keyring.backend:Loading chainer
INFO:keyring.backend:Loading macOS
INFO:pyftpsync:Download to /home/guilherme.zulian/teste
                from ftp://ftp.itaipu.gov.br/
INFO:pyftpsync:Encoding local: utf-8, remote: utf-8
INFO:pyftpsync:FEAT command failed: '550 Permission denied.'
WARNING:pyftpsync:Could not send 'OPTS UTF8 ON': '550 Permission denied.'
INFO:pyftpsync:Setting FTP encoding to utf-8 (was latin-1).
Traceback (most recent call last):
  File "t.py", line 11, in <module>
    s.run()
  File "/home/guilherme.zulian/.local/lib/python3.8/site-packages/ftpsync/synchronizers.py", line 1268, in run
    res = super(DownloadSynchronizer, self).run()
  File "/home/guilherme.zulian/.local/lib/python3.8/site-packages/ftpsync/synchronizers.py", line 827, in run
    res = super(BiDirSynchronizer, self).run()
  File "/home/guilherme.zulian/.local/lib/python3.8/site-packages/ftpsync/synchronizers.py", line 213, in run
    res = self._sync_dir()
  File "/home/guilherme.zulian/.local/lib/python3.8/site-packages/ftpsync/synchronizers.py", line 485, in _sync_dir
    remote_entries = self.remote.get_dir()
  File "/home/guilherme.zulian/.local/lib/python3.8/site-packages/ftpsync/ftp_target.py", line 514, in get_dir
    self._ftp_retrlines_native("MLSD", _addline, encoding)
  File "/home/guilherme.zulian/.local/lib/python3.8/site-packages/ftpsync/ftp_target.py", line 772, in _ftp_retrlines_native
    self.ftp.retrbinary(command, _on_read_chunk)
  File "/usr/lib/python3.8/ftplib.py", line 425, in retrbinary
    with self.transfercmd(cmd, rest) as conn:
  File "/usr/lib/python3.8/ftplib.py", line 382, in transfercmd
    return self.ntransfercmd(cmd, rest)[0]
  File "/usr/lib/python3.8/ftplib.py", line 348, in ntransfercmd
    resp = self.sendcmd(cmd)
  File "/usr/lib/python3.8/ftplib.py", line 275, in sendcmd
    return self.getresp()
  File "/usr/lib/python3.8/ftplib.py", line 248, in getresp
    raise error_perm(resp)
ftplib.error_perm: 550 Permission denied.
mar10 commented 3 years ago

That looks like no or incorrect credentials were passed?

guisz1 commented 3 years ago

yes the credentials is correct, i just retrive 3 more times and compare and the credentials is correct

guisz1 commented 3 years ago

INFO:keyring.backend:Loading KWallet INFO:keyring.backend:Loading SecretService INFO:keyring.backend:Loading Windows INFO:keyring.backend:Loading chainer INFO:keyring.backend:Loading macOS INFO:pyftpsync:Download to /home/guilherme.zulian/teste from ftp://ftp.itaipu.gov.br/ INFO:pyftpsync:Encoding local: utf-8, remote: utf-8 ERROR:pyftpsync:Could not login to svcqualidadedeagu@ftp.itaipu.gov.br: 530 Login incorrect. Traceback (most recent call last): File "t.py", line 11, in s.run() File "/home/guilherme.zulian/.local/lib/python3.8/site-packages/ftpsync/synchronizers.py", line 1268, in run res = super(DownloadSynchronizer, self).run() File "/home/guilherme.zulian/.local/lib/python3.8/site-packages/ftpsync/synchronizers.py", line 827, in run res = super(BiDirSynchronizer, self).run() File "/home/guilherme.zulian/.local/lib/python3.8/site-packages/ftpsync/synchronizers.py", line 211, in run self.remote.open() File "/home/guilherme.zulian/.local/lib/python3.8/site-packages/ftpsync/ftp_target.py", line 155, in open self.ftp.login(self.username, self.password) File "/usr/lib/python3.8/ftplib.py", line 403, in login resp = self.sendcmd('PASS ' + passwd) File "/usr/lib/python3.8/ftplib.py", line 275, in sendcmd return self.getresp() File "/usr/lib/python3.8/ftplib.py", line 248, in getresp raise error_perm(resp) ftplib.error_perm: 530 Login incorrect.

wrong credentials return this informations

guisz1 commented 3 years ago

and the permission is totally readable and writable

guisz1 commented 3 years ago

Captura de tela de 2021-01-26 16-00-16

mar10 commented 3 years ago

Can you run this with maximum verbosity?

guisz1 commented 3 years ago

INFO:keyring.backend:Loading KWallet INFO:keyring.backend:Loading SecretService INFO:keyring.backend:Loading Windows INFO:keyring.backend:Loading chainer INFO:keyring.backend:Loading macOS INFO:pyftpsync:Download to /home/guilherme.zulian/teste from ftp://ftp.itaipu.gov.br/ INFO:pyftpsync:Encoding local: utf-8, remote: utf-8 INFO:pyftpsync:Login as 'svcqualidadedeagua'. INFO:pyftpsync:SYST: '215 UNIX Type: L8'. INFO:pyftpsync:FEAT command failed: '550 Permission denied.' WARNING:pyftpsync:Server does not list utf-8 as supported feature (using it anyway). WARNING:pyftpsync:Could not send 'OPTS UTF-8': '550 Permission denied.' WARNING:pyftpsync:Could not send 'OPTS UTF8 ON': '550 Permission denied.' INFO:pyftpsync:Setting FTP encoding to utf-8 (was latin-1). Traceback (most recent call last): File "t.py", line 11, in s.run() File "/home/guilherme.zulian/.local/lib/python3.8/site-packages/ftpsync/synchronizers.py", line 1268, in run res = super(DownloadSynchronizer, self).run() File "/home/guilherme.zulian/.local/lib/python3.8/site-packages/ftpsync/synchronizers.py", line 827, in run res = super(BiDirSynchronizer, self).run() File "/home/guilherme.zulian/.local/lib/python3.8/site-packages/ftpsync/synchronizers.py", line 213, in run res = self._sync_dir() File "/home/guilherme.zulian/.local/lib/python3.8/site-packages/ftpsync/synchronizers.py", line 485, in _sync_dir remote_entries = self.remote.get_dir() File "/home/guilherme.zulian/.local/lib/python3.8/site-packages/ftpsync/ftp_target.py", line 514, in get_dir self._ftp_retrlines_native("MLSD", _addline, encoding) File "/home/guilherme.zulian/.local/lib/python3.8/site-packages/ftpsync/ftp_target.py", line 772, in _ftp_retrlines_native self.ftp.retrbinary(command, _on_read_chunk) File "/usr/lib/python3.8/ftplib.py", line 425, in retrbinary with self.transfercmd(cmd, rest) as conn: File "/usr/lib/python3.8/ftplib.py", line 382, in transfercmd return self.ntransfercmd(cmd, rest)[0] File "/usr/lib/python3.8/ftplib.py", line 348, in ntransfercmd resp = self.sendcmd(cmd) File "/usr/lib/python3.8/ftplib.py", line 275, in sendcmd return self.getresp() File "/usr/lib/python3.8/ftplib.py", line 248, in getresp raise error_perm(resp) ftplib.error_perm: 550 Permission denied.