What is the problem you are having with rclone?
Rclone Windows can't create new folder in mounted sftp drive.
Seems like Dir.Mkdir not correctly executed.
With --vfs-cache-mode=off
, directory can be created sometimes.
Maybe directory creation is conflicted with my short poll interval.
On failed cases Mkdir
command is not logged on remote side SFTPGo
What is your rclone version (output from rclone version
)
1.52 and 1.53, Winfsp 2020.1
Which OS you are using and how many bits (eg Windows 7, 64 bit)
Windows 10 x64 2004
Which cloud storage system are you using? (eg Google Drive)
SFTPGo
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
Click 'new folder' in explorer, or md in cmd.
The rclone config contents with secrets removed.
[drive]
type = sftp
host = xxxx.com
user = ftp
port = xxxx
use_insecure_cipher = false
md5sum_command = md5sum
sha1sum_command = sha1sum
key_file = C:\Tool\xxxx.pem
rclone.exe mount drive: O: -vv --vfs-cache-mode minimal --file-perms 0777 --allow-other --poll-interval=10s --dir-cache-time=30s --config C:\Users\xxx\.config\rclone\rclone.conf
A log from the command with the -vv
flag
2020/09/16 09:37:55 DEBUG : /data: Getattr: fh=0xFFFFFFFFFFFFFFFF
2020/09/16 09:37:55 DEBUG : /data: >Getattr: errc=0
2020/09/16 09:37:55 DEBUG : /data: Opendir:
2020/09/16 09:37:55 DEBUG : /data: OpenFile: flags=O_RDONLY, perm=-rwxrwxrwx
2020/09/16 09:37:55 DEBUG : /data: >OpenFile: fd=data/ (r), err=<nil>
2020/09/16 09:37:55 DEBUG : /data: >Opendir: errc=0, fh=0x5
2020/09/16 09:37:55 DEBUG : /data: Releasedir: fh=0x5
2020/09/16 09:37:55 DEBUG : /data: >Releasedir: errc=0
2020/09/16 09:37:55 DEBUG : /data/New folder: Getattr: fh=0xFFFFFFFFFFFFFFFF
2020/09/16 09:37:55 DEBUG : /data/New folder: >Getattr: errc=-2
2020/09/16 09:37:55 DEBUG : /data: Getattr: fh=0xFFFFFFFFFFFFFFFF
2020/09/16 09:37:55 DEBUG : /data: >Getattr: errc=0
2020/09/16 09:37:55 DEBUG : /data: Opendir:
2020/09/16 09:37:55 DEBUG : /data: OpenFile: flags=O_RDONLY, perm=-rwxrwxrwx
2020/09/16 09:37:55 DEBUG : /data: >OpenFile: fd=data/ (r), err=<nil>
2020/09/16 09:37:55 DEBUG : /data: >Opendir: errc=0, fh=0x5
2020/09/16 09:37:55 DEBUG : /data: Releasedir: fh=0x5
2020/09/16 09:37:55 DEBUG : /data: >Releasedir: errc=0
2020/09/16 09:37:55 DEBUG : /data: Getattr: fh=0xFFFFFFFFFFFFFFFF
2020/09/16 09:37:55 DEBUG : /data: >Getattr: errc=0
2020/09/16 09:37:55 DEBUG : /data/New folder: Mkdir: mode=0700
2020/09/16 09:37:55 ERROR : data/: Dir.Mkdir failed to create directory: mkdir dirExists failed: dirExists stat failed: sftp: "no such file or directory" (SSH_FX_FAILURE)
2020/09/16 09:37:55 ERROR : IO error: mkdir dirExists failed: dirExists stat failed: sftp: "no such file or directory" (SSH_FX_FAILURE)
2020/09/16 09:37:55 DEBUG : /data/New folder: >Mkdir: errc=-5
On remote side, Mkdir
is not logged in failed cases:
{"level":"debug","time":"2020-09-16T09:43:17.325","sender":"SFTP","connection_id":"SFTP_15e8e11df40a22e6d2c5aaed693ebc53b4e9f667a00318f07d9fc0558852ad3f","message":"error running stat on path \"/data/New folder\": stat /data/New folder: no such file or directory"}
On successed cases:
{"level":"debug","time":"2020-09-16T09:43:17.332","sender":"SFTP","connection_id":"SFTP_15e8e11df40a22e6d2c5aaed693ebc53b4e9f667a00318f07d9fc0558852ad3f","message":"new cmd, method: Mkdir, sourcePath: \"/data/New folder\", targetPath: \"\""}
{"level":"info","time":"2020-09-16T09:43:17.353","sender":"Mkdir","username":"ftp","file_path":"/data/New folder","target_path":"","filemode":"","uid":-1,"gid":-1,"access_time":"","modification_time":"","size":-1,"ssh_command":"","connection_id":"SFTP_15e8e11df40a22e6d2c5aaed693ebc53b4e9f667a00318f07d9fc0558852ad3f","protocol":"SFTP"}