Repository navigation
Open
Labels
Description
The associated forum post URL from https://forum.rclone.org
What is the problem you are having with rclone?
It is not possible to change modtime-only of a file in a mount over a backend that does not support SetModTime! I think... 😝
I did some debugging on the issue described here: https://forum.rclone.org/t/fuse-fs-create-lastmodify-time-not-editable/26700. then I end up here (line 418):
Lines 412 to 424 in 1409b89
| // set the time of the object | |
| err := f.o.SetModTime(context.TODO(), f.pendingModTime) | |
| switch err { | |
| case nil: | |
| fs.Debugf(f.o, "Applied pending mod time %v OK", f.pendingModTime) | |
| case fs.ErrorCantSetModTime, fs.ErrorCantSetModTimeWithoutDelete: | |
| // do nothing, in order to not break "touch somefile" if it exists already | |
| default: | |
| fs.Errorf(f.o, "Failed to apply pending mod time %v: %v", f.pendingModTime, err) | |
| return err | |
| } | |
| return nil |
And because the Jottacloud backend (in my test) does this:
rclone/backend/jottacloud/jottacloud.go
Lines 1407 to 1410 in 1409b89
| // SetModTime sets the modification time of the local fs object | |
| func (o *Object) SetModTime(ctx context.Context, modTime time.Time) error { | |
| return fs.ErrorCantSetModTime | |
| } |
The modtime does not change.
rclone mkdir remote:/Temp
rclone touch remote:/Temp/Testing.txt
rclone lsl remote:/Temp
0 2021-09-25 17:30:57.000000000 Testing.txt
rclone mount remote:/Temp X: --vfs-cache-mode full[System.IO.File]::GetLastWriteTime("X:\Testing.txt").ToString("o")
2021-09-25T17:30:57.0000000+02:00
[System.IO.File]::SetLastWriteTime("X:\Testing.txt", (Get-Date -Year 2007))
[System.IO.File]::GetLastWriteTime("X:\Testing.txt").ToString("o")
2021-09-25T17:30:57.0000000+02:00What is your rclone version (output from rclone version)
In my test, built from master:
rclone v1.57.0-DEV
- os/version: Microsoft Windows 10 Enterprise 1909 (64 bit)
- os/kernel: 10.0.18363.1734 (x86_64)
- os/type: windows
- os/arch: amd64
- go/version: go1.17
- go/linking: dynamic
- go/tags: cmount
Which cloud storage system are you using? (e.g. Google Drive)
In my test: Jottacloud. In forum thread: Koofr.
The command you were trying to run (e.g. rclone copy /tmp remote:tmp)
rclone mount remote:/Temp X: --vfs-cache-mode full
A log from the command with the -vv flag (e.g. output from rclone -vv copy /tmp remote:tmp)
2021/09/25 17:34:49 DEBUG : /Testing.txt: Getattr: fh=0xFFFFFFFFFFFFFFFF
2021/09/25 17:34:49 DEBUG : /Testing.txt: >Getattr: errc=0
2021/09/25 17:34:49 DEBUG : /Testing.txt: Getattr: fh=0xFFFFFFFFFFFFFFFF
2021/09/25 17:34:49 DEBUG : /Testing.txt: >Getattr: errc=0
2021/09/25 17:34:49 DEBUG : /Testing.txt: OpenEx: flags=0x1
2021/09/25 17:34:49 DEBUG : /Testing.txt: OpenFile: flags=O_WRONLY, perm=-rwxrwxrwx
2021/09/25 17:34:49 DEBUG : Testing.txt: Open: flags=O_WRONLY
2021/09/25 17:34:49 DEBUG : Testing.txt: newRWFileHandle:
2021/09/25 17:34:49 DEBUG : Testing.txt: >newRWFileHandle: err=<nil>
2021/09/25 17:34:49 DEBUG : Testing.txt: >Open: fd=Testing.txt (rw), err=<nil>
2021/09/25 17:34:49 DEBUG : /Testing.txt: >OpenFile: fd=Testing.txt (rw), err=<nil>
2021/09/25 17:34:49 DEBUG : /Testing.txt: >OpenEx: errc=0, fh=0x0
2021/09/25 17:34:49 DEBUG : /Testing.txt: Getattr: fh=0x0
2021/09/25 17:34:49 DEBUG : /Testing.txt: >Getattr: errc=0
2021/09/25 17:34:49 DEBUG : /Testing.txt: Utimens: tmsp=[{Sec:1632583857 Nsec:0} {Sec:1285428889 Nsec:143715600}]
2021/09/25 17:34:49 DEBUG : /Testing.txt: Utimens: SetModTime: 2010-09-25 17:34:49.1437156 +0200 CEST
2021/09/25 17:34:49 DEBUG : /Testing.txt: >Utimens: errc=0
2021/09/25 17:34:49 DEBUG : /Testing.txt: Getattr: fh=0x0
2021/09/25 17:34:49 DEBUG : /Testing.txt: >Getattr: errc=0
2021/09/25 17:34:49 DEBUG : /Testing.txt: Flush: fh=0x0
2021/09/25 17:34:49 DEBUG : Testing.txt(0xc00077e180): RWFileHandle.Flush
2021/09/25 17:34:49 DEBUG : /Testing.txt: >Flush: errc=0
2021/09/25 17:34:49 DEBUG : /Testing.txt: Release: fh=0x0
2021/09/25 17:34:49 DEBUG : Testing.txt(0xc00077e180): RWFileHandle.Release
2021/09/25 17:34:49 DEBUG : Testing.txt(0xc00077e180): close:
2021/09/25 17:34:49 DEBUG : Testing.txt(0xc00077e180): >close: err=<nil>
2021/09/25 17:34:49 DEBUG : /Testing.txt: >Release: errc=0
2021/09/25 17:34:51 DEBUG : /Testing.txt: Getattr: fh=0xFFFFFFFFFFFFFFFF
2021/09/25 17:34:51 DEBUG : /Testing.txt: >Getattr: errc=0
2021/09/25 17:34:51 DEBUG : /Testing.txt: Getattr: fh=0xFFFFFFFFFFFFFFFF
2021/09/25 17:34:51 DEBUG : /Testing.txt: >Getattr: errc=0
2021/09/25 17:34:51 DEBUG : /Testing.txt: OpenEx: flags=0x0
2021/09/25 17:34:51 DEBUG : /Testing.txt: OpenFile: flags=O_RDONLY, perm=-rwxrwxrwx
2021/09/25 17:34:51 DEBUG : Testing.txt: Open: flags=O_RDONLY
2021/09/25 17:34:51 DEBUG : Testing.txt: newRWFileHandle:
2021/09/25 17:34:51 DEBUG : Testing.txt: >newRWFileHandle: err=<nil>
2021/09/25 17:34:51 DEBUG : Testing.txt: >Open: fd=Testing.txt (rw), err=<nil>
2021/09/25 17:34:51 DEBUG : /Testing.txt: >OpenFile: fd=Testing.txt (rw), err=<nil>
2021/09/25 17:34:51 DEBUG : /Testing.txt: >OpenEx: errc=0, fh=0x0
2021/09/25 17:34:51 DEBUG : /Testing.txt: Flush: fh=0x0
2021/09/25 17:34:51 DEBUG : Testing.txt(0xc00077e1c0): RWFileHandle.Flush
2021/09/25 17:34:51 DEBUG : /Testing.txt: >Flush: errc=0
2021/09/25 17:34:51 DEBUG : /Testing.txt: Release: fh=0x0
2021/09/25 17:34:51 DEBUG : Testing.txt(0xc00077e1c0): RWFileHandle.Release
2021/09/25 17:34:51 DEBUG : Testing.txt(0xc00077e1c0): close:
2021/09/25 17:34:51 DEBUG : Testing.txt(0xc00077e1c0): >close: err=<nil>
2021/09/25 17:34:51 DEBUG : /Testing.txt: >Release: errc=0
How to use GitHub
- Please use the 👍 reaction to show that you are affected by the same issue.
- Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
- Subscribe to receive notifications on status change and new comments.
Activity
[-]It is not possible to change modtime-only of a file in a mount over a backend that does not support `SetModTime`[/-][+]It is not possible to change modtime-only of a file in a mount over a backend that does not support SetModTime[/+]ivandeex commentedon Sep 26, 2021
SetModTimeis allowed to returnfs.ErrorCantSetModTimeWithoutDeleteSome operations can throw it up, some can workaround eg. by re-uploading if they deem so, for example:
I discuss it in #1066 (comment)
albertony commentedon Sep 26, 2021
Yes, I knew about the copy/sync doing re-upload if necessary. Just didn't know if this was supposed to be handled the same way with mounts and other commands..
So the outcome of this issue is either:
ivandeex commentedon Sep 26, 2021
feel free to change labels after selecting a strategy