You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I run 'rclone mount' and 'rclone move' on linux. I found that the file operation that I did as early as November 2017 has annoying file and folder name bug. Folders and files that ends with a dot or and space will look like garbage name in other machine such as windows and Android machine. Look at the example in the link above.
Basically, only Google drive official app on Android can see the name properly. All other apps will see the name as garbage.
As i do 'rclone mount' on linux and share with my network via Samba protocol, all my machines such as nvidia shield, android phone, windows pc all see the name of the folders and files as garbage.
What is your rclone version (eg output from rclone -V)
Both stable and beta. Beta one is
root@jupiter:~/# rclone -V
rclone v1.41-061-g96977547β
os/arch: linux/amd64
go version: go1.10.1
Which OS you are using and how many bits (eg Windows 7, 64 bit)
Rclone mount on linux ubuntu 64 bits and on Nvidia shield Linux /android base 64 bit
Which cloud storage system are you using? (eg Google Drive)
Google drive
The command you were trying to run (eg rclone copy /tmp remote:tmp)
rclone move and mount. Both with rclone cache and without. This bug affects as old as the time rclone doesn't have cache feature
A log from the command with the -vv flag (eg output from rclone -vv copy /tmp remote:tmp)
The root cause of this is mount exporting invalid file names to windows.
This should probably be fixed with a flag (which defaults to true on windows) which does the same name translation as the onedrive backend. For example if a file has a ? in it will be mapped to ? instead.
This should be a flag so that this can be enabled for linux servers which might serve to windows backends.
Can confirm this would need a fix.
Had an issue with a trailing space in a folder name (on a WebDav backend)
User lost a bunch of files, he wasn't prompted with any errors on file saves,
rclone considered these files uploaded (whereas they weren't) and deleted them after vfs-cache-max-age.
So no way to recover.
After some tests, no problem with rclone copy
2021/04/15 17:48:33 DEBUG : Using config file from "C:\\Users\\Maxime\\.config\\rclone\\rclone.conf"
2021/04/15 17:48:33 DEBUG : rclone: Version "v1.55.0" starting with parameters ["rclone" "copy" "ok.txt" "SC:WebDav/Test " "-vv"]
2021/04/15 17:48:33 DEBUG : Creating backend with remote "ok.txt"
2021/04/15 17:48:33 DEBUG : fs cache: adding new entry for parent of "ok.txt", "//?/C:/Users/Maxime/Documents/tools/rclone"
2021/04/15 17:48:33 DEBUG : Creating backend with remote "SC:WebDav/Test "
2021/04/15 17:48:34 DEBUG : ok.txt: Need to transfer - File not found at Destination
2021/04/15 17:48:34 INFO : ok.txt: Copied (new)
2021/04/15 17:48:34 INFO :
Transferred: 2 / 2 Bytes, 100%, 3 Bytes/s, ETA 0s
Transferred: 1 / 1, 100%
Elapsed time: 1.5s
2021/04/15 17:48:34 DEBUG : 4 go routines active
But mount says it's uploaded whereas it's not
2021/04/15 17:50:10 DEBUG : Test /ok.txt: vfs cache: starting upload
2021/04/15 17:50:10 INFO : Test /ok.txt: vfs cache: upload succeeded try #1
Moreover, if I drag and drop the file to that folder with trailing space,
it still isn't uploaded but a new folder without the trailing space is created on the backend
And here is a few more output on a remount
2021/04/15 17:41:11 ERROR : Local file system at //?/C:/Users/Maxime/AppData/Local/rclone/vfs/SC/WebDav: Failed to list "Test ": directory not found
2021/04/15 17:41:11 DEBUG : Test : Removing directory
2021/04/15 17:41:11 ERROR : Test : Failed to rmdir: remove \\?\C:\Users\Maxime\AppData\Local\rclone\vfs\SC\WebDav\Test␠: Le fichier spécifié est introuvable.
2021/04/15 17:41:11 ERROR : Local file system at //?/C:/Users/Maxime/AppData/Local/rclone/vfs/SC/WebDav: vfs cache: failed to remove empty directories from cache path "": remove \\?\C:\Users\Maxime\AppData\Local\rclone\vfs\SC\WebDav\Test␠: Le fichier spécifié est introuvable.
2021/04/15 17:41:11 ERROR : Local file system at //?/C:/Users/Maxime/AppData/Local/rclone/vfs/SC/WebDav: Failed to list "Test ": directory not found
2021/04/15 17:41:11 DEBUG : Test : Removing directory
2021/04/15 17:41:11 ERROR : Test : Failed to rmdir: remove \\?\C:\Users\Maxime\AppData\Local\rclone\vfs\SC\WebDav\Test␠: Le fichier spécifié est introuvable.
2021/04/15 17:41:11 ERROR : Local file system at //?/C:/Users/Maxime/AppData/Local/rclone/vfs/SC/WebDav: vfs cache: failed to remove empty directories from metadata cache path "": remove \\?\C:\Users\Maxime\AppData\Local\rclone\vfs\SC\WebDav\Test␠: Le fichier spécifié est introuvable.
rclone lsd after renaming the garbled name to its original shows strange characters: (in kitty on Arch Linux with the JetBrainsMono font it looks like a bullet list in an application window)
The root cause of this is mount exporting invalid file names to windows.
This should probably be fixed with a flag (which defaults to true on windows) which does the same name translation as the onedrive backend. For example if a file has a ? in it will be mapped to ? instead.
This should be a flag so that this can be enabled for linux servers which might serve to windows backends.
I think if rclone did the name translation in the VFS layer then this would fix the problem, so the vfs needs a --vfs-encoding flag which defaults to the same encoding as --local-encoding but can be changed for linux servers serving to Windows.
I was under the impression that the colon problem affected Windows and not Linux.
Since I am using rclone in a Linux-only environment, my assumption was that the colon will be transferred as a colon. (However, I can only assume that the Hetzner storage box is Unix/Linux; rclone finds md5 and sha and reports shell_type = unix). So from my earlier understanding, no WinFSP involved and no name translation necessary in theory.
This is why I wanted to add this behaviour under Linux here in this issue. It was the first most matching issue which came up to my search for the problem.
From my understanding now, rclone uses WinFSP, whether or not Windows is involved. Is that correct?
Again, if this is sitting in the wrong issue here, then I will be glad to open a new one.
Ah! CIFS/Samba! Great Odin's raven! I will test that. Thank you very much!
Edit: scratch that. The proposed solution mangled names = no is of course a samba server setting, and the samba server is under Hetzner's control. Thank you anyway, I will implement some measure on my side that removes colons.
Ah! CIFS/Samba! Great Odin's raven! I will test that. Thank you very much!
Edit: scratch that. The proposed solution mangled names = no is of course a samba server setting, and the samba server is under Hetzner's control. Thank you anyway, I will implement some measure on my side that removes colons.
If the sftp backend had an --encoding-sftp flag you could use this to fix the problem. But apparently it doesn't! I guess because most sftp servers are unix based.
Activity
[-]Annoying folder name bug[/-][+]mount: exports invalid windows file names[/+]ncw commentedon Jun 1, 2018
The root cause of this is
mountexporting invalid file names to windows.This should probably be fixed with a flag (which defaults to true on windows) which does the same name translation as the onedrive backend. For example if a file has a
?in it will be mapped to?instead.This should be a flag so that this can be enabled for linux servers which might serve to windows backends.
ivandeex commentedon Feb 9, 2021
@lopoki Does the problem reproduce with rclone 1.54?
ivandeex commentedon Mar 15, 2021
Ticket is forgotten by the author but it looks like the problem still needs a fix
Maxime-J commentedon Apr 15, 2021
Can confirm this would need a fix.
Had an issue with a trailing space in a folder name (on a WebDav backend)
User lost a bunch of files, he wasn't prompted with any errors on file saves,
rclone considered these files uploaded (whereas they weren't) and deleted them after vfs-cache-max-age.
So no way to recover.
After some tests, no problem with rclone copy
But mount says it's uploaded whereas it's not
Moreover, if I drag and drop the file to that folder with trailing space,
it still isn't uploaded but a new folder without the trailing space is created on the backend
And here is a few more output on a remount
I can run some more tests if needed.
stueja commentedon Jul 27, 2023
May I add that this happens also between a Linux environment and a Hetzner Storagebox using rclone 1.63.1.
One Linux host (
merak) uploads files and folders via rclone/sftp into the storagebox. Another host (dubhealpha) mounts a cifs share of the storagebox.rclone:
ls of the cifs mount:
rclone lsdafter renaming the garbled name to its original shows strange characters: (in kitty on Arch Linux with the JetBrainsMono font it looks like a bullet list in an application window)So how can I work around that?
The cifs mount:
Le Config(tm):
Le Command(tm):
Edit: just saw that the original issue is kinda seasoned. Let me know and I open a new one.
ncw commentedon Jul 28, 2023
This is what I wrote above @Maxime-J
And I think this is the cause of your problems too.
For example you can't have a
:in a windows file name so WinFSP is mapping it to a private unicode range which doesn't display well on most OSeswinfsp/sshfs-win#22
I think if rclone did the name translation in the VFS layer then this would fix the problem, so the vfs needs a
--vfs-encodingflag which defaults to the same encoding as--local-encodingbut can be changed for linux servers serving to Windows.Do you think that describes your problem?
stueja commentedon Jul 28, 2023
Ah then maybe I misunderstood something.
I was under the impression that the colon problem affected Windows and not Linux.
Since I am using rclone in a Linux-only environment, my assumption was that the colon will be transferred as a colon. (However, I can only assume that the Hetzner storage box is Unix/Linux; rclone finds
md5andshaand reportsshell_type = unix). So from my earlier understanding, no WinFSP involved and no name translation necessary in theory.This is why I wanted to add this behaviour under Linux here in this issue. It was the first most matching issue which came up to my search for the problem.
From my understanding now,
rcloneuses WinFSP, whether or not Windows is involved. Is that correct?Again, if this is sitting in the wrong issue here, then I will be glad to open a new one.
ncw commentedon Jul 28, 2023
@stueja sorry I didn't read your post carefully enough. Yes you can store files with
:on storagebox. However I'm not sure CIFS/smb can show them.For example see: https://unix.stackexchange.com/questions/299130/samba-how-to-display-files-with-colon-in-their-names
So I think that it is Windows file names that are the problem but in the samba layer.
stueja commentedon Jul 28, 2023
Ah! CIFS/Samba! Great Odin's raven! I will test that. Thank you very much!
Edit: scratch that. The proposed solution
mangled names = nois of course a samba server setting, and the samba server is under Hetzner's control. Thank you anyway, I will implement some measure on my side that removes colons.ncw commentedon Jul 29, 2023
If the sftp backend had an
--encoding-sftpflag you could use this to fix the problem. But apparently it doesn't! I guess because most sftp servers are unix based.