Max path length for Onedrive + crypt

Hi,
I'm using Onedrive with the crypt backend, using standard encryption for filenames. I'm trying to understand path and filename length limitations:

  1. What is the maximum path length I can use (before encryption), given https://rclone.org/onedrive/ states Onedrive supports maximum path lengths of 400 chars?

  2. https://rclone.org/crypt/ states the maximum support filename length is 143 chars, before encryption. Where is the fundamental limit coming from? Local filesystems?

  3. What is crypt's overhead for filename encryption?

Thanks a ton for writing and maintaining rclone. It's beautifully designed, written, and documented, and the rare piece of software that behaves exactly as expected, which made it super simple to get up and running in minutes!

It says 400.

That's coming as a general statement to be safe across mostly all providers and the OS. On one drive it would be higher given the limit is 400. But your OS likely has limits if you want to copy it back down.

https://rclone.org/crypt/#name-encryption

If you try this rclone will work out what length it supports

rclone info --check-control=false --check-length=true --check-normalization=false --check-streaming=false cryptremote:

Note that is an internal debug command and not documented!

2 Likes

I mentioned this in my question. What I'm wanting to find out is what this means for before-encryption length.

I think you may be confusing path length and filename length. See my question.

I did read that before posting, but it unfortunately doesn't answer my question.

Super helpful, thank you!

For the curious, OneDrive via Webdav shows me a limit of 362. My " /personal/[YOUR-EMAIL]/Documents" part of the URL happens to be 38 characters (see https://rclone.org/webdav/), making the sum 400. I assume this is more than a coincidence.

1 Like

That command will leave a load of files called aaaa....aaa behind you'll need to delete BTW!

Yes, I noticed. This helped confirm to me that the command determines the length empirically.

I noticed the command also creates the remote path (mkdir) if it didn't exist :slight_smile:

Yes there are all sorts of dangerous things on that command... I should probably tidy it up a bit!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.