Path exceeds 260 characters

Questions about Cobian Reflector
Jaremek
Posts: 5
Joined: 27 Sep 2023, 07:50

Re: Path exceeds 260 characters

Post by Jaremek »

Both places, source and destination, are local resources (matrix after fibre channel). You can no longer copy long paths.
Jaremek
Posts: 5
Joined: 27 Sep 2023, 07:50

Re: Path exceeds 260 characters

Post by Jaremek »

Both places, source and destination, are local resources (matrix after fibre channel). You can no longer copy long paths.
User avatar
cobian
Site Admin
Posts: 4611
Joined: 31 Oct 2020, 01:25
Location: Sweden
Contact:

Re: Path exceeds 260 characters

Post by cobian »

No idea then. There has never been any restrictions from copying long names since 1999 with Cobian Backup 3.
--
Luis Cobian
Cobian Backup's creator
User avatar
landydoc
Posts: 10
Joined: 22 Jun 2023, 14:22

Re: Path exceeds 260 characters

Post by landydoc »

I have some new infomation about the cause of the error messages "Could not copy the NTFS permissions..."

I tried to copy only the relevant files which make the error. Therefore I used "robocopy source destination /MIR" and copied the complete path from the network destination to a local drive.
It seems that I was completely wrong in assuming that the path is somehow too long. It is not the number of characters which makes the problem. It looks like it is the depth of the path. The path had about 260 chars and included 26 levels of subdirectories. The files were copied as they were by Reflector before. When I analyzed the resulted copy of "robocopy" I found that beginning from subdir level 25 down to the included files in subdir(26) the NTFS permissions were missing. They were missing in all entries deeper than level 24 (directories and fles). So robocopy has the same behavior as Reflector showed but with the difference that robocopy even does not give any error output about that. At least Reflector notices the failure and prints this error message.

Is there any hope fore a workaround?
User avatar
cobian
Site Admin
Posts: 4611
Joined: 31 Oct 2020, 01:25
Location: Sweden
Contact:

Re: Path exceeds 260 characters

Post by cobian »

NTFS has a a big limit for filenames (32760 characters) , but I *think* (not completly sure) that any component of the path cannot be larger than 256 characters.
--
Luis Cobian
Cobian Backup's creator
User avatar
landydoc
Posts: 10
Joined: 22 Jun 2023, 14:22

Re: Path exceeds 260 characters

Post by landydoc »

It is not the problem of the character size of a single path component. It seems to be the problem that the NTFS permissions are only copied for a limited number of component in the path. So if the path has more than 24 nested components (index > 24) the remaining subdirectories and files are copied but not their NTFS permissions. They are missing completly for all path elements behind number 24. It seems to be a Microsoft limit as Microsoft robocopy shows this limit as I found in my tests (see above).

Reflector shows the same behavior. It is not able to copy any permissions of path elements with an index greater than 24, so that for paths with more than 24 components (directories or files) the permissions are missing. Does Reflector use any Microsoft functions or SDK for the single copy tasks?

Reflector notices that the permissions are missing and reports an error message for each file and directory. So is there a chance for a workaround for such paths with more than 24 components?
User avatar
cobian
Site Admin
Posts: 4611
Joined: 31 Oct 2020, 01:25
Location: Sweden
Contact:

Re: Path exceeds 260 characters

Post by cobian »

Yes, the program uses Windows API CopyFileExW to copy files and SetSecurityInfo to set the permissions.
--
Luis Cobian
Cobian Backup's creator
Post Reply