Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FTP(ES) Won't list any files once connected to ftp server [BUG] #2585

Open
1 task done
agentx3 opened this issue Apr 7, 2024 · 2 comments
Open
1 task done

FTP(ES) Won't list any files once connected to ftp server [BUG] #2585

agentx3 opened this issue Apr 7, 2024 · 2 comments
Labels

Comments

@agentx3
Copy link

agentx3 commented Apr 7, 2024

Checks

  • I have read the FAQ section, searched the open issues, and still think this is a new bug.

Describe the bug you encountered:

I am attempting to open a remote database for the first time, via the "Open file..." button on the main screen.

When I put in the connection string and details, it connects but then shows the "Root" directory as "empty".
The FTP user in question is in a chroot so if the "Root" directory is "/" then that should be correct. However, the directory should not be empty.

When I connect with a different FTP client I am able to see and read the *.kdbx files so it is not a permission issue. I can also verify that the connection was successful, as my server logs reveal the authentication was successful.

Describe what you expected to happen:

I expected to see existing files and directories once FTP connection was established.


I am opening this as a new issue because it seems like other FTP((E)S) issues are at least able to view the files.

For additional context I am running my own FTP server using vsftpd

What version of Keepass2Android are you using?

1.10-pre

Which version of Android are you on?

14

@agentx3 agentx3 added the bug label Apr 7, 2024
@agentx3
Copy link
Author

agentx3 commented Apr 8, 2024

Sorry, I had not look in closed issues. Possibly related to #2423, but since I'm not 100% sure I'll let you decide if this is the same or different issue.

@agentx3
Copy link
Author

agentx3 commented Apr 10, 2024

Here is the output log that I was able to dig up for a connection attempt. I've redacted out some information such as the domain and IP.

[FluentFTP] Connecting to IP #1= ***:21
4/10/2024 9:40:05 PM:981 -- [FluentFTP] Waiting for a response
4/10/2024 9:40:06 PM:7 -- [FluentFTP] Response: 220 (vsFTPd *.*.*) [738985.903d]
4/10/2024 9:40:06 PM:8 -- [FluentFTP] Status:   Detected FTP server: VsFTPd
4/10/2024 9:40:06 PM:8 -- [FluentFTP] Command:  AUTH TLS
4/10/2024 9:40:06 PM:9 -- [FluentFTP] Waiting for response to: AUTH TLS
4/10/2024 9:40:06 PM:35 -- [FluentFTP] Response: 234 Proceed with negotiation. [25ms]
4/10/2024 9:40:06 PM:124 -- [FluentFTP] FTPS authentication successful, lib = .NET SslStream, cipher suite = Tls12 (None, None, 0) [86ms]
4/10/2024 9:40:06 PM:125 -- [FluentFTP] Command:  USER ***
4/10/2024 9:40:06 PM:127 -- [FluentFTP] Waiting for response to: USER ***
4/10/2024 9:40:06 PM:158 -- [FluentFTP] Response: 331 Please specify the password. [30ms]
4/10/2024 9:40:06 PM:159 -- [FluentFTP] Command:  PASS ***
4/10/2024 9:40:06 PM:161 -- [FluentFTP] Waiting for response to: PASS ***
4/10/2024 9:40:06 PM:197 -- [FluentFTP] Response: 230 Login successful. [34ms]
4/10/2024 9:40:06 PM:198 -- [FluentFTP] Command:  PBSZ 0
4/10/2024 9:40:06 PM:201 -- [FluentFTP] Waiting for response to: PBSZ 0
4/10/2024 9:40:06 PM:230 -- [FluentFTP] Response: 200 PBSZ set to 0. [29ms]
4/10/2024 9:40:06 PM:231 -- [FluentFTP] Command:  PROT P
4/10/2024 9:40:06 PM:233 -- [FluentFTP] Waiting for response to: PROT P
4/10/2024 9:40:06 PM:264 -- [FluentFTP] Response: 200 PROT now Private. [30ms]
4/10/2024 9:40:06 PM:266 -- [FluentFTP] Command:  FEAT
4/10/2024 9:40:06 PM:268 -- [FluentFTP] Waiting for response to: FEAT
4/10/2024 9:40:06 PM:322 -- [FluentFTP] Response: 211-Features:
Response: EPRT
Response: EPSV
Response: MDTM
Response: PASV
Response: PBSZ
Response: PROT
Response: REST STREAM
Response: SIZE
Response: TVFS
Response: UTF8
4/10/2024 9:40:06 PM:323 -- [FluentFTP] Response: 211 End [55ms]
4/10/2024 9:40:06 PM:324 -- [FluentFTP] Text encoding: System.Text.UTF8Encoding
4/10/2024 9:40:06 PM:325 -- [FluentFTP] Command:  OPTS UTF8 ON
4/10/2024 9:40:06 PM:327 -- [FluentFTP] Waiting for response to: OPTS UTF8 ON
4/10/2024 9:40:06 PM:367 -- [FluentFTP] Response: 200 Always in UTF8 mode. [39ms]
4/10/2024 9:40:06 PM:368 -- [FluentFTP] Command:  SYST
4/10/2024 9:40:06 PM:370 -- [FluentFTP] Waiting for response to: SYST
4/10/2024 9:40:06 PM:401 -- [FluentFTP] Response: 215 UNIX Type: L8 [28ms]
4/10/2024 9:40:06 PM:402 -- [FluentFTP] Listing parser set to: Unix
4/10/2024 9:40:06 PM:403 -- [FluentFTP] Command:  PWD
4/10/2024 9:40:06 PM:405 -- [FluentFTP] Waiting for response to: PWD
4/10/2024 9:40:06 PM:439 -- [FluentFTP] Response: 257 "/" is the current directory [33ms]
4/10/2024 9:40:06 PM:440 -- FTP: IocToUri out = ftp://foo.bar.example/
4/10/2024 9:40:06 PM:441 -- [FluentFTP] >         SetWorkingDirectory("/")
4/10/2024 9:40:06 PM:442 -- [FluentFTP] Command:  CWD /
4/10/2024 9:40:06 PM:444 -- [FluentFTP] Waiting for response to: CWD /
4/10/2024 9:40:06 PM:484 -- [FluentFTP] Response: 250 Directory successfully changed. [39ms]
4/10/2024 9:40:06 PM:485 -- [FluentFTP] Command:  PWD
4/10/2024 9:40:06 PM:487 -- [FluentFTP] Waiting for response to: PWD
4/10/2024 9:40:06 PM:516 -- [FluentFTP] Response: 257 "/" is the current directory [27ms]
4/10/2024 9:40:06 PM:517 -- [FluentFTP] >         GetListing(null, SizeModify, AllFiles)
4/10/2024 9:40:06 PM:518 -- [FluentFTP] Command:  TYPE I
4/10/2024 9:40:06 PM:519 -- [FluentFTP] Waiting for response to: TYPE I
4/10/2024 9:40:06 PM:662 -- [FluentFTP] Response: 200 Switching to Binary mode. [142ms]
4/10/2024 9:40:06 PM:662 -- [FluentFTP] >         OpenDataStream("LIST -a /", 0)
4/10/2024 9:40:06 PM:662 -- [FluentFTP] >         OpenPassiveDataStream(AutoPassive, "LIST -a /", 0)
4/10/2024 9:40:06 PM:663 -- [FluentFTP] Command:  EPSV
4/10/2024 9:40:06 PM:663 -- [FluentFTP] Waiting for response to: EPSV
4/10/2024 9:40:06 PM:694 -- [FluentFTP] Response: 229 Entering Extended Passive Mode (|||45837|) [29ms]
4/10/2024 9:40:06 PM:694 -- [FluentFTP] Connecting to IP #1= ***:45837
4/10/2024 9:40:06 PM:721 -- [FluentFTP] Command:  LIST -a /
4/10/2024 9:40:06 PM:723 -- [FluentFTP] Waiting for response to: LIST -a /
4/10/2024 9:40:06 PM:753 -- [FluentFTP] Response: 150 Here comes the directory listing. [28ms]
4/10/2024 9:40:06 PM:832 -- [FluentFTP] FTPS authentication successful, lib = .NET SslStream, cipher suite = Tls12 (None, None, 0) [78ms]
4/10/2024 9:40:06 PM:833 -- [FluentFTP]
+---------------------------------------+
4/10/2024 9:40:06 PM:834 -- [FluentFTP] -----------------------------------------
4/10/2024 9:40:06 PM:834 -- [FluentFTP] Closing/Disposing FtpSocketStream(data connection)
4/10/2024 9:40:06 PM:835 -- [FluentFTP] >         CloseDataStream()
4/10/2024 9:40:06 PM:835 -- [FluentFTP] Waiting for response to: LIST -a /
4/10/2024 9:40:06 PM:865 -- [FluentFTP] Response: 522 SSL connection failed [141ms]
4/10/2024 9:40:06 PM:865 -- [FluentFTP] Closing/Disposing FtpSocketStream(data connection)
4/10/2024 9:40:06 PM:866 -- [FluentFTP] >         Dispose()
4/10/2024 9:40:06 PM:866 -- [FluentFTP] Disposing FtpClient object...
4/10/2024 9:40:06 PM:866 -- [FluentFTP] Command:  QUIT
4/10/2024 9:40:06 PM:872 -- [FluentFTP] Waiting for response to: QUIT
4/10/2024 9:40:06 PM:896 -- [FluentFTP] Response: 221 Goodbye. [27ms]
4/10/2024 9:40:06 PM:897 -- [FluentFTP] Closing/Disposing FtpSocketStream(control connection)
4/10/2024 9:40:06 PM:898 -- [FluentFTP] Closing/Disposing FtpSocketStream(control connection)
4/10/2024 9:40:06 PM:901 -- FluentFTP.Exceptions.FtpCommandException: Code: 522 Message: SSL connection failed
  at keepass2android.Io.NetFtpFileStorage.ListContents (KeePassLib.Serialization.IOConnectionInfo ioc) [0x00176] in <4387dcce18dd490eadd43a838bbc0f3d>:0 
  at keepass2android.Io.OfflineSwitchableFileStorage.ListContents (KeePassLib.Serialization.IOConnectionInfo ioc) [0x00000] in <4387dcce18dd490eadd43a838bbc0f3d>:0 
  at keepass2android.Io.CachingFileStorage.ListContents (KeePassLib.Serialization.IOConnectionInfo ioc) [0x00000] in <4387dcce18dd490eadd43a838bbc0f3d>:0 
  at keepass2android.FileChooserFileProvider.ListFiles (System.Int32 taskId, System.String dirName, System.Boolean showHiddenFiles, System.Int32 filterMode, System.Int32 limit, System.String positiveRegex, System.String negativeRegex, System.Collections.Generic.IList`1[T] fileList, System.Boolean[] hasMoreFiles) [0x00012] in <dabeaecbf9c0465bb1ce8a7bcc561766>:0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant