martinstoeckli / SilentNotes

SilentNotes is a simple note taking app which respects your privacy.
https://www.martinstoeckli.ch/silentnotes
Mozilla Public License 2.0
238 stars 35 forks source link

FTP sync to vsftpd not working at all (SSL & no SSL) #237

Closed cosmolabs-ru closed 8 months ago

cosmolabs-ru commented 8 months ago

TL;DR DotNet-based FTP clients can't connect to some FTP server implementations (like vsftpd). Accept it and install another ftp server.

With my own FTP server on VPS: repeated connection fails with differen reasons. "Could not sync, try again later." "Check login/password, internet connection and access rights on the server". This happens with and without SSL enabled. tried connecting by hostname and by IP, tried to specify ports, tried with and without ftp:// and sftp:// prefixes, tried to specify folders - no effect. Internet connection works. Credentials are correct. FTP server itself works perfectly with FileZilla & WinSCP, with & without SSL enabled. That proves creds are correct and server is configured correctly. I run latest vsftpd on Debian 11. Same problem on win10 & Android.

Using a public FTP server for testing (I just googled it): sync works.

Are there any special requirements for a FTP server? because it refuses to connect to a specific one, but server works with other clients.

martinstoeckli commented 8 months ago

Thanks for reporting. Yes the DotNet FTP implementation (development environment) does not work with all known FTP servers. Often it is enough to accept invalid certificates, but you said that the problem also occurs with plain FTP, so this won't help. One thing you can try, is to access the FTP directory with the Windows Explorer (not Internet Explorer), usually if the Explorer can connect, SilentNotes can do as well.

P.S. DotNet only accepts ftp:// connections (ftps::// won't work), but in contrast to http:// vs https:// the "s" does not indicate a secure connection, the secure connection is independend of the URL.

cosmolabs-ru commented 8 months ago

Windows Explorer does not connect as well. Is it a problem of SilentNotes or one of vsftpd? Will another server work?

martinstoeckli commented 8 months ago

As far as I know, the Windows Explorer and applications built with DotNet have the same capabilities with accessing FTP servers. If the Explorer cannot access the server, they are probably not compatible, or maybe it's just a special configuration of the FTP server, I cannot tell. Tools like FileZilla are much more versatile and can work with more types of FTP connections.