Weird Slash in File Names

What is the problem you are having with rclone?

There is an odd slash character in file names when using ftp, I think it's related to encoding, but it causes rclone to spew errors and odd behavior when using any rclone command.

Run the command 'rclone version' and share the full output of the command.

rclone v1.69.3

  • os/version: slackware 15.0+ (64 bit)
  • os/kernel: 6.14.6-1-liquorix-amd64 (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.24.3
  • go/linking: static
  • go/tags: none

Which cloud storage system are you using? (eg Google Drive)

FTP

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone ls -vvv BasicFileSync:/

Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.

[BasicFileSync]
type = ftp
host = XXX
user = XXX
pass = XXX

A log from the command that you were trying to run with the -vv flag

2025/06/11 14:10:35 DEBUG : rclone: Version "v1.69.3" starting with parameters ["rclone" "ls" "--log-file=output.txt" "-vvv" "BasicFileSync:/"]
2025/06/11 14:10:35 DEBUG : Creating backend with remote "BasicFileSync:/"
2025/06/11 14:10:35 DEBUG : Using config file from "/home/charadon/.config/rclone/rclone.conf"
2025/06/11 14:10:35 DEBUG : ftp://192.168.64.7:21: Connecting to FTP server
2025/06/11 14:10:35 DEBUG : ftp://192.168.64.7:21: dial("tcp","192.168.64.7:21")
2025/06/11 14:10:35 DEBUG : ftp://192.168.64.7:21: > dial: conn=*fshttp.timeoutConn, err=<nil>
2025/06/11 14:10:35 DEBUG : ftp://192.168.64.7:21: dial("tcp","192.168.64.7:64759")
2025/06/11 14:10:35 DEBUG : ftp://192.168.64.7:21: > dial: conn=*fshttp.timeoutConn, err=<nil>
2025/06/11 14:10:35 DEBUG : ftp://192.168.64.7:21: Connecting to FTP server
2025/06/11 14:10:35 DEBUG : ftp://192.168.64.7:21: dial("tcp","192.168.64.7:21")
2025/06/11 14:10:35 DEBUG : ftp://192.168.64.7:21: dial("tcp","192.168.64.7:64758")
2025/06/11 14:10:35 DEBUG : ftp://192.168.64.7:21: > dial: conn=*fshttp.timeoutConn, err=<nil>
2025/06/11 14:10:35 DEBUG : ftp://192.168.64.7:21: > dial: conn=*fshttp.timeoutConn, err=<nil>
2025/06/11 14:10:35 ERROR : /: error listing: directory not found
2025/06/11 14:10:35 DEBUG : ftp://192.168.64.7:21: dial("tcp","192.168.64.7:64757")
2025/06/11 14:10:35 DEBUG : ftp://192.168.64.7:21: > dial: conn=*fshttp.timeoutConn, err=<nil>
2025/06/11 14:10:35 DEBUG : ftp://192.168.64.7:21: dial("tcp","192.168.64.7:64756")
2025/06/11 14:10:35 DEBUG : ftp://192.168.64.7:21: > dial: conn=*fshttp.timeoutConn, err=<nil>
2025/06/11 14:10:36 ERROR : test//test: error listing: directory not found
2025/06/11 14:10:36 DEBUG : 4 go routines active
2025/06/11 14:10:36 DEBUG : ftp://192.168.64.7:21: closing 2 unused connections
2025/06/11 14:10:36 NOTICE: Failed to ls with 3 errors: last error was: directory not found

More Info

The FTP server being used is tnftpd by NetBSD.

welcome to the forum,

what other ftp tools have you tested?

lftp and GNU ftp work fine.

lftp output:

lftp files@192.168.64.7:~> ls                    
total 1                              
drwxr-xr-x  2 0  100  2 Jun 11 17:55 test
lftp files@192.168.64.7:/> 

what about rclone ls -vv BasicFileSync:


might need to use ftp-encoding


fwiw, does the server support sftp, as rclone has better support for that including file transfer verification using checksums.

Well, the idea behind using ftp was because i'm trying to get file sync between my netbook and home, originally I did try to use SFTP, but I found it extremely slow since there was 3 layers of encryption (Wireguard, SSH, Local Disk Encryption) and my netbook is not very fast... I found ftp to be the fastest and most reliable, but rclone just has this one issue.

I've looked into the ftp-encoding, but all I could manage to do with it, was make it not follow the weird slash infinitely by setting encoding to Slash

Also, the log I pasted in my original post is the output of that command you asked me to run :wink:

that is not correct in two ways ;wink

2025/06/11 14:25:52 DEBUG : rclone: Version "v1.69.3" starting with parameters ["rclone" "ls" "-vv" "BasicFileSync:"]
2025/06/11 14:25:52 DEBUG : Creating backend with remote "BasicFileSync:"
2025/06/11 14:25:52 DEBUG : Using config file from "/home/charadon/.config/rclone/rclone.conf"
2025/06/11 14:25:52 DEBUG : ftp://192.168.64.7:21: Connecting to FTP server
2025/06/11 14:25:52 DEBUG : ftp://192.168.64.7:21: dial("tcp","192.168.64.7:21")
2025/06/11 14:25:52 DEBUG : ftp://192.168.64.7:21: > dial: conn=*fshttp.timeoutConn, err=<nil>
2025/06/11 14:25:52 DEBUG : ftp://192.168.64.7:21: dial("tcp","192.168.64.7:64512")
2025/06/11 14:25:52 DEBUG : ftp://192.168.64.7:21: > dial: conn=*fshttp.timeoutConn, err=<nil>
2025/06/11 14:25:52 DEBUG : ftp://192.168.64.7:21: Connecting to FTP server
2025/06/11 14:25:52 DEBUG : ftp://192.168.64.7:21: dial("tcp","192.168.64.7:21")
2025/06/11 14:25:52 DEBUG : ftp://192.168.64.7:21: > dial: conn=*fshttp.timeoutConn, err=<nil>
2025/06/11 14:25:52 DEBUG : ftp://192.168.64.7:21: dial("tcp","192.168.64.7:64511")
2025/06/11 14:25:52 DEBUG : ftp://192.168.64.7:21: > dial: conn=*fshttp.timeoutConn, err=<nil>
2025/06/11 14:25:52 ERROR : /: error listing: directory not found
2025/06/11 14:25:57 DEBUG : ftp://192.168.64.7:21: dial("tcp","192.168.64.7:64510")
2025/06/11 14:25:57 DEBUG : ftp://192.168.64.7:21: > dial: conn=*fshttp.timeoutConn, err=<nil>
2025/06/11 14:25:57 DEBUG : ftp://192.168.64.7:21: dial("tcp","192.168.64.7:64509")
2025/06/11 14:25:57 DEBUG : ftp://192.168.64.7:21: > dial: conn=*fshttp.timeoutConn, err=<nil>
2025/06/11 14:25:57 ERROR : test//test: error listing: directory not found
2025/06/11 14:25:57 DEBUG : 4 go routines active
2025/06/11 14:25:57 DEBUG : ftp://192.168.64.7:21: closing 2 unused connections
2025/06/11 14:25:57 NOTICE: Failed to ls with 3 errors: last error was: directory not found

here ya go, same output

I have seen similar problems when passive mode is broken. Either not supported by your ftp server or blocked by firewall or vpn configuration. When client tries to open new data connection to the server:

I suspect that this port does not respond and listing fails.

Please note that passive mode is only mode supported by rclone ftp implementation.

It gets a listing successfully, but it puts that weird slash. I've confirmed that it's able to connect to passive ports

And it does have something to do with path listing, as files don't get the slash, but all folders do.

Okay, so i've figured out that the weird slash is actually the PWD of the directory. As if I disable chroot on the server, it now says /home/files. I have no idea how to disable that though.

So, I switched to vsftpd instead of the NetBSD ftpd daemon, and the weird PWD directory is gone. So this is probably a bug in rclone or the golang ftp library that's used.

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