What is the problem you are having with rclone?
Directories with shortcuts cannot be removed via a mounted remote.
What is your rclone version (output from rclone version
)
rclone v1.52.0
- os/arch: linux/amd64
- go version: go1.14.3
Which OS you are using and how many bits (eg Windows 7, 64 bit)
Devuan 3.0, 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
)
# cd /mnt/remote/
# mkdir dir1
# touch dir1/file
# mkdir dir2
# rclone backend shortcut drive: dir1/file dir2/shortcut
{}
# rm -rf dir2
rm: cannot remove 'dir2': Input/output error
# rclone purge drive:dir2 -vvv
2020/06/10 11:46:13 DEBUG : rclone: Version "v1.52.0" starting with parameters ["rclone" "purge" "drive:dir2" "-vvv"]
2020/06/10 11:46:13 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"
2020/06/10 11:46:14 DEBUG : 6 go routines active
# cd
The rclone config contents with secrets removed.
[drive]
type = drive
scope = drive,drive.appfolder
service_account_file = <file path>
impersonate = <email address
root_folder_id = <string>
server_side_across_configs = true
A log from the command with the -vv
flag
# rclone mount drive: /mnt/remote --allow-other --dir-cache-time=8760h --async-read=false --fast-list --links --rc --rc-no-auth --use-mmap --vfs-read-chunk-size=32M -vvv
2020/06/10 11:43:35 DEBUG : rclone: Version "v1.52.0" starting with parameters ["rclone" "mount" "drive:" "/mnt/remote" "--allow-other" "--dir-cache-time=8760h" "--async-read=false" "--fast-list" "--links" "--rc" "--rc-no-auth" "--use-mmap" "--vfs-read-chunk-size=32M" "-vvv"]
2020/06/10 11:43:35 NOTICE: Serving remote control on http://127.0.0.1:5572/
2020/06/10 11:43:35 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"
2020/06/10 11:43:35 DEBUG : Google drive root '': Mounting on "/mnt/remote"
2020/06/10 11:43:35 DEBUG : Adding path "vfs/forget" to remote control registry
2020/06/10 11:43:35 DEBUG : Adding path "vfs/refresh" to remote control registry
2020/06/10 11:43:35 DEBUG : Adding path "vfs/poll-interval" to remote control registry
2020/06/10 11:43:35 DEBUG : : Root:
2020/06/10 11:43:35 DEBUG : : >Root: node=/, err=<nil>
2020/06/10 11:43:40 DEBUG : /: Attr:
2020/06/10 11:43:40 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2020/06/10 11:43:46 DEBUG : : Statfs:
2020/06/10 11:43:46 DEBUG : : >Statfs: stat={Blocks:278929608797 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=<nil>
2020/06/10 11:43:47 DEBUG : : Statfs:
2020/06/10 11:43:47 DEBUG : : >Statfs: stat={Blocks:278929608797 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=<nil>
2020/06/10 11:43:48 DEBUG : : Statfs:
2020/06/10 11:43:48 DEBUG : : >Statfs: stat={Blocks:278929608797 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=<nil>
2020/06/10 11:43:48 DEBUG : /: Lookup: name="dir1"
2020/06/10 11:43:48 DEBUG : /: >Lookup: node=<nil>, err=no such file or directory
2020/06/10 11:43:48 DEBUG : /: Mkdir: name="dir1"
2020/06/10 11:43:49 DEBUG : : Statfs:
2020/06/10 11:43:49 DEBUG : : >Statfs: stat={Blocks:278929608797 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=<nil>
2020/06/10 11:43:49 DEBUG : /: >Mkdir: node=dir1/, err=<nil>
2020/06/10 11:43:49 DEBUG : dir1/: Attr:
2020/06/10 11:43:49 DEBUG : dir1/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
[SNIP]
2020/06/10 11:43:56 DEBUG : : Statfs:
2020/06/10 11:43:56 DEBUG : : >Statfs: stat={Blocks:278929608797 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=<nil>
2020/06/10 11:43:56 DEBUG : dir1/: Lookup: name="file"
2020/06/10 11:43:57 DEBUG : : Statfs:
2020/06/10 11:43:57 DEBUG : : >Statfs: stat={Blocks:278929608797 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=<nil>
2020/06/10 11:43:57 DEBUG : dir1/: >Lookup: node=<nil>, err=no such file or directory
2020/06/10 11:43:57 DEBUG : dir1/: Create: name="file"
2020/06/10 11:43:57 DEBUG : dir1/file: Open: flags=O_WRONLY|O_CREATE|0x800
2020/06/10 11:43:57 DEBUG : dir1/file: >Open: fd=dir1/file (w), err=<nil>
2020/06/10 11:43:57 DEBUG : dir1/: >Create: node=dir1/file, handle=&{dir1/file (w)}, err=<nil>
2020/06/10 11:43:57 DEBUG : dir1/file: Attr:
2020/06/10 11:43:57 DEBUG : dir1/file: >Attr: a=valid=1s ino=0 size=0 mode=-rw-r--r--, err=<nil>
2020/06/10 11:43:57 DEBUG : &{dir1/file (w)}: Flush:
2020/06/10 11:43:57 DEBUG : dir1/file: WriteFileHandle.Flush unwritten handle, writing 0 bytes to avoid race conditions
2020/06/10 11:43:57 DEBUG : &{dir1/file (w)}: >Flush: err=<nil>
2020/06/10 11:43:57 DEBUG : dir1/file: Setattr: a=Setattr [ID=0x2a Node=0x3 Uid=0 Gid=0 Pid=7917] atime=2020-06-10 11:43:57.064380411 +0000 UTC atime=now mtime=2020-06-10 11:43:57.064380411 +0000 UTC mtime=now handle=INVALID-0x0
2020/06/10 11:43:57 DEBUG : dir1/file: >Setattr: err=<nil>
2020/06/10 11:43:57 DEBUG : dir1/file: Attr:
2020/06/10 11:43:57 DEBUG : dir1/file: >Attr: a=valid=1s ino=0 size=0 mode=-rw-r--r--, err=<nil>
2020/06/10 11:43:57 DEBUG : &{dir1/file (w)}: Flush:
2020/06/10 11:43:57 DEBUG : Google drive root '': File to upload is small (0 bytes), uploading instead of streaming
2020/06/10 11:43:58 DEBUG : : Statfs:
2020/06/10 11:43:58 DEBUG : : >Statfs: stat={Blocks:278929608797 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=<nil>
2020/06/10 11:43:58 DEBUG : dir1/file: MD5 = d41d8cd98f00b204e9800998ecf8427e OK
2020/06/10 11:43:58 INFO : dir1/file: Copied (new)
2020/06/10 11:43:59 DEBUG : : Statfs:
2020/06/10 11:43:59 DEBUG : : >Statfs: stat={Blocks:278929608797 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=<nil>
2020/06/10 11:43:59 DEBUG : dir1/file: File._applyPendingModTime OK
2020/06/10 11:43:59 DEBUG : &{dir1/file (w)}: >Flush: err=<nil>
2020/06/10 11:43:59 DEBUG : &{dir1/file (w)}: Release:
2020/06/10 11:43:59 DEBUG : dir1/file: WriteFileHandle.Release nothing to do
2020/06/10 11:43:59 DEBUG : &{dir1/file (w)}: >Release: err=<nil>
2020/06/10 11:44:00 DEBUG : : Statfs:
2020/06/10 11:44:00 DEBUG : : >Statfs: stat={Blocks:278929608797 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=<nil>
2020/06/10 11:44:01 DEBUG : : Statfs:
2020/06/10 11:44:01 DEBUG : : >Statfs: stat={Blocks:278929608797 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=<nil>
2020/06/10 11:44:02 DEBUG : : Statfs:
2020/06/10 11:44:02 DEBUG : : >Statfs: stat={Blocks:278929608797 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=<nil>
2020/06/10 11:44:02 DEBUG : /: Lookup: name="dir2"
2020/06/10 11:44:02 DEBUG : /: >Lookup: node=<nil>, err=no such file or directory
2020/06/10 11:44:02 DEBUG : /: Mkdir: name="dir2"
2020/06/10 11:44:03 DEBUG : : Statfs:
2020/06/10 11:44:03 DEBUG : : >Statfs: stat={Blocks:278929608797 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=<nil>
2020/06/10 11:44:03 DEBUG : /: >Mkdir: node=dir2/, err=<nil>
2020/06/10 11:44:03 DEBUG : dir2/: Attr:
2020/06/10 11:44:03 DEBUG : dir2/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
[SNIP]
2020/06/10 11:44:35 DEBUG : : Statfs:
2020/06/10 11:44:35 DEBUG : : >Statfs: stat={Blocks:278929608797 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=<nil>
2020/06/10 11:44:35 DEBUG : Google drive root '': Checking for changes on remote
2020/06/10 11:44:36 DEBUG : : Statfs:
2020/06/10 11:44:36 DEBUG : : >Statfs: stat={Blocks:278929608797 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=<nil>
2020/06/10 11:44:36 DEBUG : : changeNotify: relativePath="dir1", type=2
2020/06/10 11:44:36 DEBUG : : invalidating directory cache
2020/06/10 11:44:36 DEBUG : dir1: invalidating directory cache
2020/06/10 11:44:36 DEBUG : : >changeNotify:
2020/06/10 11:44:36 DEBUG : : changeNotify: relativePath="dir1/file", type=3
2020/06/10 11:44:36 DEBUG : : >changeNotify:
2020/06/10 11:44:36 DEBUG : : changeNotify: relativePath="dir2", type=2
2020/06/10 11:44:36 DEBUG : : >changeNotify:
[SNIP]
2020/06/10 11:45:35 DEBUG : : Statfs:
2020/06/10 11:45:35 DEBUG : : >Statfs: stat={Blocks:278929608797 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=<nil>
2020/06/10 11:45:35 DEBUG : Google drive root '': Checking for changes on remote
2020/06/10 11:45:36 DEBUG : : Statfs:
2020/06/10 11:45:36 DEBUG : : >Statfs: stat={Blocks:278929608797 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=<nil>
2020/06/10 11:45:36 DEBUG : : changeNotify: relativePath="dir2/shortcut", type=3
2020/06/10 11:45:36 DEBUG : : >changeNotify:
[SNIP]
2020/06/10 11:45:52 DEBUG : : Statfs:
2020/06/10 11:45:52 DEBUG : : >Statfs: stat={Blocks:278929608797 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=<nil>
2020/06/10 11:45:52 DEBUG : /: Lookup: name="dir2"
2020/06/10 11:45:52 DEBUG : /: >Lookup: node=dir2/, err=<nil>
2020/06/10 11:45:52 DEBUG : dir2/: Attr:
2020/06/10 11:45:52 DEBUG : dir2/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2020/06/10 11:45:52 DEBUG : dir2/: ReadDirAll:
2020/06/10 11:45:53 DEBUG : : Statfs:
2020/06/10 11:45:53 DEBUG : : >Statfs: stat={Blocks:278929608797 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=<nil>
2020/06/10 11:45:53 DEBUG : dir2/: >ReadDirAll: item=1, err=<nil>
2020/06/10 11:45:53 DEBUG : dir2/: Attr:
2020/06/10 11:45:53 DEBUG : dir2/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2020/06/10 11:45:53 DEBUG : dir2/: ReadDirAll:
2020/06/10 11:45:53 DEBUG : dir2/: >ReadDirAll: item=1, err=<nil>
2020/06/10 11:45:53 DEBUG : dir2/: Lookup: name="shortcut"
2020/06/10 11:45:53 DEBUG : dir2/: >Lookup: node=dir2/shortcut, err=<nil>
2020/06/10 11:45:53 DEBUG : dir2/shortcut: Attr:
2020/06/10 11:45:53 DEBUG : dir2/shortcut: >Attr: a=valid=1s ino=0 size=0 mode=-rw-r--r--, err=<nil>
2020/06/10 11:45:53 DEBUG : dir2/: Remove: name="shortcut"
2020/06/10 11:45:53 DEBUG : dir2/: >Remove: err=<nil>
2020/06/10 11:45:53 DEBUG : /: Lookup: name="dir2"
2020/06/10 11:45:53 DEBUG : /: >Lookup: node=dir2/, err=<nil>
2020/06/10 11:45:53 DEBUG : dir2/: Attr:
2020/06/10 11:45:53 DEBUG : dir2/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2020/06/10 11:45:53 DEBUG : /: Remove: name="dir2"
2020/06/10 11:45:54 DEBUG : : Statfs:
2020/06/10 11:45:54 DEBUG : : >Statfs: stat={Blocks:278929608797 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=<nil>
2020/06/10 11:45:54 DEBUG : dir2: Rmdir: contains file: "shortcut"
2020/06/10 11:45:54 ERROR : dir2/: Dir.Remove failed to remove directory: directory not empty
2020/06/10 11:45:54 DEBUG : /: >Remove: err=directory not empty