Cannot browse <ftp-server>. SFTP server error

Hi,

Sorry to add one more topic about SFTP server error, but I didn’t manage to solve my issue by myself, I didn’t find any log file on my workstation.

My odrive doesn’t want to connect anymore to my SFTP server since few months ago. Btw, it would have been good to have an alert, I was assuming odrive was working well all that long, which it’s actually not the case.

It’s a SFTP server on my own dedicated server, so I can adapt any configuration to help solve this, as soon as I know what is wrong.

Thank you in advance for your help.

Julien

Hi @odrive10,
Can you reproduce the error and then send a diagnostic from the odrive menu so I can take a closer look?

I just figured out that download is working but not upload. Therefore, I am not sure how to reproduce an error…

The error I mentioned in the title is what I get from the web UI: https://www.odrive.com/browse/

Ok, I have figured out (it was not hard actually :-))

I have just sent the report.

Hi @odrive10,
odrive is having an issue with an item that looks to have a ‘é’ character in it. Can you check that on the server and change the character to see if it helps?

Can you also tell me about the server? What is the configuration in terms of OS, filesystem, and SFTP server?

Well, I am French, there might be some character with accent in my file names (é, è, ê, à, etc.) … I hope I can keep these accents.

Which exact file should I rename?

I have checked on the server, I see some files with accent and I notice that the "é"and “è” are both replaced with “eÌ” on the server.

The server is a Debian 8, with proftpd.

Hi @odrive10,
The issue isn’t the character, itself, since we fully support and have tested these types of characters in our SFTP integration.

The issue is that there are filenames that are not encoded as expected. They may be ISO-8859-1 vs UTF-8, for example. This is a bit odd since default filename encoding is usually going to be UTF-8/ASCII, especially on Linux systems, but there may be something that is writing files to that system in a different encoding, somehow.

In order for the odrive SFTP integration to work properly, UTF-8 (or a subset of it) are needed.

I’ve been looking at ways to check for the filename encoding, and this method seems to work, mostly. It is an ugly one-line python script you can run on the server in a given folder. If you copy and paste this command it will go through each item in the current directory and spit out the “estimated” filename encoding.

python -c "(lambda __g, __y, __print: [[(lambda __after, __items, __sentinel: __y(lambda __this: lambda: (lambda __i: [(__print(('%s => %s (%s)' % (n, chardet.detect(n)['encoding'], chardet.detect(n)['confidence']))), __this())[1] for __g['n'] in [(__i)]][0] if __i is not __sentinel else __after())(next(__items, __sentinel)))())(lambda: None, iter(os.listdir('.')), []) for __g['os'] in [(__import__('os', __g, __g))]][0] for __g['chardet'] in [(__import__('chardet', __g, __g))]][0])(globals(), (lambda f: (lambda x: x(x))(lambda y: f(lambda: y(y)()))), __import__('__builtin__', level=0).__dict__['print'])"

The diagnostic shows issues listing the root folder of your SFTP link and the “P Docs” folder, but there may be others. If you run the above command in those folders, do you see any encodings that are not ascii or utf-8?

Ok, I will have to re-code this to be recursive because there are a lot of folders under ‘P Docs’.

Or maybe I should consider to stop using SFTP.

Will I have the same issue with another cloud storage?

What is the cloud storage which works the best with odrive? Is Dropbox synchronizing well with odrive?

Thanks,

Julien

Hi @odrive10,
I don’t think you need to abandon SFTP yet.

If you just run the command under those two folders, for now, can you tell me which encodings you see? I expect mostly ascii or utf-8 to be listed, but there must be another, too.

If we know that we can convert to utf-8. Additionally, you may be able to see a pattern and we can figure out why the filenames have a different encoding.