Documention still correct? "Note that some SFTP servers will need the leading / - Synology is a good example of this."

Hi everyone,

the documentation states to use a slash in front of remote strings for example if you are using a synology. But when I don't it does seem to work though:

sudo rclone copy -vv --retries 1 --config /root/.config/rclone/rclone.conf --dump headers <LOCAL PATH>/photos_input/test.txt nas_photos_manager:photos_input
2023/03/07 15:18:11 DEBUG : rclone: Version "v1.61.0" starting with parameters ["rclone" "copy" "-vv" "--retries" "1" "--config" "/root/.config/rclone/rclone.conf" "--dump" "headers" "<LOCAL PATH>/photos_input/test.txt" "nas_photos_manager:photos_input"]
2023/03/07 15:18:11 DEBUG : Creating backend with remote "<LOCAL PATH>/photos_input/test.txt"
2023/03/07 15:18:11 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"
2023/03/07 15:18:11 DEBUG : fs cache: adding new entry for parent of "<LOCAL PATH>/photos_input/test.txt", "<LOCAL PATH>/photos_input"
2023/03/07 15:18:11 DEBUG : Creating backend with remote "nas_photos_manager:photos_input"
2023/03/07 15:18:11 DEBUG : sftp://<USER>@<IP>:22/photos_input: New connection 192.168.YY.XX:37544-><IP>:22 to "SSH-2.0-OpenSSH_8.2"
2023/03/07 15:18:11 DEBUG : sftp://<USER>@<IP>:22/photos_input: Running shell type detection remote command: echo ${ShellId}%ComSpec%
2023/03/07 15:18:11 DEBUG : sftp://<USER>@<IP>:22/photos_input: Remote command failed: Process exited with status 1 (stdout=[]) (stderr=[80 101 114 109 105 115 115 105 111 110 32 100 101 110 105 101 100 44 32 112 108 101 97 115 101 32 116 114 121 32 97 103 97 105 110 46])
2023/03/07 15:18:11 DEBUG : sftp://<USER>@<IP>:22/photos_input: Shell type "unix" detected (set option shell_type to override)
2023/03/07 15:18:11 DEBUG : Saving config "shell_type" in section "nas_photos_manager" of the config file
2023/03/07 15:18:11 DEBUG : Keeping previous permissions for config file: -rw-r--r--
2023/03/07 15:18:11 DEBUG : sftp://<USER>@<IP>:22/photos_input: Relative path resolved to "/photos_input"
2023/03/07 15:18:11 DEBUG : sftp://<USER>@<IP>:22/photos_input: Using root directory "/photos_input"
2023/03/07 15:18:11 DEBUG : test.txt: Size and modification time the same (differ by 0s, within tolerance 1s)
2023/03/07 15:18:11 DEBUG : test.txt: Unchanged skipping
2023/03/07 15:18:11 INFO  : 
Transferred:              0 B / 0 B, -, 0 B/s, ETA -
Checks:                 1 / 1, 100%
Elapsed time:         0.3s

2023/03/07 15:18:11 DEBUG : 11 go routines active
2023/03/07 15:18:11 DEBUG : sftp://<USER>@<IP>:22/photos_input: Closing 1 unused connections

slashes are a finicky thing. fwiw, i find what works and use that.

--dump headers, as per rclone docs, that does not work with sftp.

if you need more assistance, then post the redacted config file?

Hi, using dump-headers was just a dumb copy & paste issue :smiley:

I don't know if i was precise enough: From the logs you can see that I am using


From what I understood the docs say that I instead should use a slash there:


But it seems to work without a slash. Or do I misunderstand something?

This means use the directory called photos_input in your home directory

This means use the directory called photos_input in the root directory.

Now if the root directory and your home directory are the same thing then they mean the same. This is often the case in chrooted SFTP setups (which this may be - I don't know).

I would use the one without the / if it works as that will get you into good habits with the other rclone backends!

in my backup scripts, i always use fullpaths, so i guess i never really noticed the / issue.

i have never had to use that,
perhaps there are some differences in your synology firmware or model.

Thanks. I specifically asked because my backend is a Synology. And it works without a slash. That's why I am asking for the docs.

That belongs to the FTP setup in the other thread, has nothing to do with the SFTP setup discussed here :slight_smile:

ok, thanks for clarifying.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.