What happens if I try to encrypt a folder, and file paths are longer than 143 characters?

Currently reading
What happens if I try to encrypt a folder, and file paths are longer than 143 characters?

291
89
NAS
DS920+, DS416slim
Operating system
  1. Windows
Mobile operating system
  1. Android
I have a shared folder I would like to encrypt. It's a folder I've been using for ages and there are loads of different folders/files.

Before you encrypt there is the warning about an individual file's maximum path being 143 characters. Will DSM scan the folder to determine this before it starts encryption and highlight the issues? Or..... ?
 
Solution
I'd rather have some control over the renaming rather than simply trimming the file name (which is what I expect that does?)
All that does is list offending files in shared folder “homes” that are no more than 15 folders deep. It renames nothing.

NOTE: If you get permissions errors, append 'sudo' to the command, to run with 'root' privileges.

sudo find /volumeX/homes/ -maxdepth 15 | grep -P '\/[^\/]{143,}[^\/]'

If you get no results, you are OK. If interested, change '143' to a lower value (for example, 20) to see the response.

Run that with each shared folder path you wish to encrypt.
AFAIK, it encrypts compliant files, leaving noncompliant files unencrypted. With each noncompliant file, it will throw an error, that you must confirm.

If you really want to do this, it is better to change filenames beforehand. For a specific shared folder...
Code:
find /volumeX/homes/ -maxdepth 15 | grep -P '\/[^\/]{143,}[^\/]'
Adjust maxdepth as desired.
 
Upvote 0
Wow - thank you. The ssh code is kind of gibberish to me but I think I know how to implement it...!

Is there a similar code I could use that would display all the files that would fall foul of the 143 character rule? I'd rather have some control over the renaming rather than simply trimming the file name (which is what I expect that does?)
 
Upvote 0
Last edited:
I'd rather have some control over the renaming rather than simply trimming the file name (which is what I expect that does?)
All that does is list offending files in shared folder “homes” that are no more than 15 folders deep. It renames nothing.

NOTE: If you get permissions errors, append 'sudo' to the command, to run with 'root' privileges.

sudo find /volumeX/homes/ -maxdepth 15 | grep -P '\/[^\/]{143,}[^\/]'

If you get no results, you are OK. If interested, change '143' to a lower value (for example, 20) to see the response.

Run that with each shared folder path you wish to encrypt.
 
Upvote 0
Solution
If it is of interest, when I got caught by the 143 character limit, I used an app 'Path Length Checker' on Majorgeeks, running on Windows.
I was saving emails, of which some news emails had rediculously long names. I found though, when I shortened them, the names lost their meaning and so I gave up with the encrypted drive space. -I also unsubscribed from the news link, in particular.
 
Upvote 0

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Trending threads

Back
Top