Hamoud
(Hamoud)
April 19, 2023, 1:48pm
1
What is the problem you are having with rclone?
I am trying to copy a file from my local drive to a mounted drive using the following rclone command
rclone mount OneDriveP: Z: --network-mode --volname \\server\share --file-perms=0777 --vfs-cache-mode=full
but windows keep showing a message that the destination already has a file with the same name, even though it does not. If I press "replace file in destination" I get the following error message "invalid MS-DOS" function; if I press "Skip", I see that a file with the same name has been created in the destination but with zero size. When I try to copy the file from the windows cmd I get the following message:
Incorrect function.
0 file(s) copied.
I googled the issues but could not find any relevant discussion. I also tried running a beta version of rclone but the problem persisted. This behavior has not always been there. I have been using rclone with no issues for over a year. I think this started happening in the last few weeks. Would really appreciate any tips on how to resolve this.
Run the command 'rclone version' and share the full output of the command.
rclone v1.62.2
os/version: Microsoft Windows 10 Enterprise 21H2 (64 bit)
os/kernel: 10.0.19044.2728 Build 19044.2728.2728 (x86_64)
os/type: windows
os/arch: amd64
go/version: go1.20.2
go/linking: static
go/tags: cmount
Which cloud storage system are you using? (eg Google Drive)
OneDrive
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
rclone mount OneDriveP: Z: --network-mode --volname \\server\share --file-perms=0777 --vfs-cache-mode=full
The rclone config contents with secrets removed.
[OneDriveP]
type = onedrive
token =
drive_id =
drive_type = personal
A log from the command with the -vv
flag
The log is here: Microsoft Windows [Version 10.0.19044.2728](c) Microsoft Corporation. All righ - Pastebin.com
asdffdsa
(jojothehumanmonkey)
April 19, 2023, 1:57pm
2
welcome to the forum,
using rclone copy
, not rclone mount
,
can you copy files without error?
might test a simpler command
rclone mount OneDriveP: Z:
Hamoud
(Hamoud)
April 19, 2023, 2:07pm
3
Thanks for the quick reply.
Using the rclone copy
I could copy the file.
The issue still persists using the simpler mount command.
asdffdsa
(jojothehumanmonkey)
April 19, 2023, 2:20pm
4
need to reproduce the issue and post te rclone debug log.
so i would
kill the rclone mount
add something like --log-level=DEBUG --log-file=c:\path\to\rclone.log
re-create the issue
kiil the rclone mount
post the full debug log
Hamoud
(Hamoud)
April 19, 2023, 3:15pm
5
asdffdsa
(jojothehumanmonkey)
April 19, 2023, 4:13pm
6
with that log, hopefully someone else can comment on it.
ncw
(Nick Craig-Wood)
April 19, 2023, 4:19pm
7
Here is the problem in the log
2023/04/19 17:12:53 DEBUG : /Presentation.pdf: CreateEx: flags=0x502, mode=0700
2023/04/19 17:12:53 DEBUG : Presentation.pdf: Open: flags=O_RDWR|O_CREATE|O_EXCL
2023/04/19 17:12:53 DEBUG : Presentation.pdf: newRWFileHandle:
2023/04/19 17:12:53 DEBUG : Presentation.pdf: >newRWFileHandle: err=file already exists
2023/04/19 17:12:53 DEBUG : Presentation.pdf: File.openRW failed: file already exists
2023/04/19 17:12:53 DEBUG : Presentation.pdf: >Open: fd=<nil *RWFileHandle>, err=file already exists
2023/04/19 17:12:53 DEBUG : /Presentation.pdf: >CreateEx: errc=-17, fh=0xFFFFFFFFFFFFFFFF
This is the application trying to create the file and rclone returning that it already exists. It does that because it was opened with the O_EXCL
and O_CREATE
.
So why did it exist already???
Apparently a fraction of a second earlier the file was created
2023/04/19 17:12:53 DEBUG : /Presentation.pdf: CreateEx: flags=0x502, mode=0700
2023/04/19 17:12:53 DEBUG : Presentation.pdf: Open: flags=O_RDWR|O_CREATE|O_EXCL
2023/04/19 17:12:53 DEBUG : Presentation.pdf: newRWFileHandle:
2023/04/19 17:12:53 DEBUG : Presentation.pdf(0xc00082aac0): openPending:
2023/04/19 17:12:53 DEBUG : Presentation.pdf: vfs cache: truncate to size=0 (not needed as size correct)
2023/04/19 17:12:53 DEBUG : : Added virtual directory entry vAddFile: "Presentation.pdf"
2023/04/19 17:12:53 DEBUG : Presentation.pdf(0xc00082aac0): >openPending: err=<nil>
2023/04/19 17:12:53 DEBUG : Presentation.pdf: >newRWFileHandle: err=<nil>
2023/04/19 17:12:53 DEBUG : : Added virtual directory entry vAddFile: "Presentation.pdf"
2023/04/19 17:12:53 DEBUG : Presentation.pdf: >Open: fd=Presentation.pdf (rw), err=<nil>
2023/04/19 17:12:53 DEBUG : /Presentation.pdf: >CreateEx: errc=0, fh=0x0
How exactly are you copying the file to the rclone mount
?
ncw
(Nick Craig-Wood)
April 19, 2023, 4:19pm
8
..also do you have the latest WinFSP?
Hamoud
(Hamoud)
April 19, 2023, 4:47pm
9
I tried copying the file both using ctrl + c - ctrl + v, and through the copy command in the command prompt.
Hamoud
(Hamoud)
April 19, 2023, 4:49pm
10
I am not sure. Should I download/update it?
asdffdsa
(jojothehumanmonkey)
April 19, 2023, 4:57pm
11
the latest is:
https://github.com/winfsp/winfsp/releases/tag/v2.0
Hamoud:
I am not sure.
to find the version
ncw
(Nick Craig-Wood)
April 19, 2023, 5:06pm
12
I feel sure that other Windows users would have reported this if it was a widespread problem.
This is suspicious... What changes have been made to your system?
Experience with weird problems on Windows leads me to ask are you using a virus scanner? Can you turn it off then try the test?
Hamoud
(Hamoud)
April 19, 2023, 5:10pm
13
I installed the version in the link. The version I have now is 2.0.23075.0. But that still made no difference.
Hamoud
(Hamoud)
April 19, 2023, 5:16pm
14
This computer is managed by an IT department, and many things get updated frequently. But mostly installed software updates.
Nothing seems to be running besides Microsoft's own virus and threats protection. I will have to check with admin though.
Hamoud
(Hamoud)
April 19, 2023, 5:18pm
15
Is there maybe a way to completely uninstall rclone and install it again and see if this helps?
asdffdsa
(jojothehumanmonkey)
April 19, 2023, 5:40pm
16
did you reboot the computer?
well, how did you install rclone?
rclone.exe is a portable app, does not need to be installed.
all i have ever done.
download the .zip
unzip
run rclone.exe
Hamoud
(Hamoud)
April 19, 2023, 6:07pm
17
Yes, I did
Right, it is been a while since I did that
system
(system)
Closed
May 19, 2023, 6:07pm
18
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.