Repository navigation
Description
Before you start
- I have searched the forum and the existing issues for this problem.
- I have tested with the latest beta or stable release and can still reproduce the problem.
- This is a reproducible bug, not a usage question (questions belong on the forum).
Associated forum post URL
No response
What is the problem you are having with rclone?
Description:
When running LSD with the --ftp-force-list-hidden option, the contents of the specified directory are not displayed. Instead, the contents of the FTP root directory are shown.
When using LS, the output shows a completely incorrect directory structure.
Expected behavior:
The command should display the contents and directory structure of the specified folder.
Actual behavior:
LSD --ftp-force-list-hidden displays the FTP root directory’s contents, while LS displays an incorrect directory structure containing
LS without --ftp-force-list-hidden:
sudo rclone ls ftp:/WD-MyPassport2628-01/backup/Nextcloud | grep IMG_20211231_154158.jpg
474106 __groupfolders/3/Takeout/Google Fotos/Fotos von 2021/IMG_20211231_154158.jpg
747 __groupfolders/3/Takeout/Google Fotos/Fotos von 2021/IMG_20211231_154158.jpg.supplemental-metadata.json
LS with --ftp-force-list-hidden:
sudo rclone ls ftp:/WD-MyPassport2628-01/backup/Nextcloud --ftp-force-list-hidden | grep IMG_20211231_154158.jpg
474106 WD-MyPassport2628-01/WD-MyPassport2628-01/WD-MyPassport2628-01/FRITZ/IMG_20211231_154158.jpg
747 WD-MyPassport2628-01/WD-MyPassport2628-01/WD-MyPassport2628-01/FRITZ/IMG_20211231_154158.jpg.supplemental-metadata.json
474106 FRITZ/IMG_20211231_154158.jpg
747 FRITZ/IMG_20211231_154158.jpg.supplemental-metadata.json
474106 WD-MyPassport2628-01/FRITZ/IMG_20211231_154158.jpg
747 WD-MyPassport2628-01/FRITZ/IMG_20211231_154158.jpg.supplemental-metadata.json
474106 WD-MyPassport2628-01/WD-MyPassport2628-01/WD-MyPassport2628-01/WD-MyPassport2628-01/WD-MyPassport2628-01/WD-MyPassport2628-01/FRITZ/IMG_20211231_154158.jpg
747 WD-MyPassport2628-01/WD-MyPassport2628-01/WD-MyPassport2628-01/WD-MyPassport2628-01/WD-MyPassport2628-01/WD-MyPassport2628-01/FRITZ/IMG_20211231_154158.jpg.supplemental-metadata.json
474106 WD-MyPassport2628-01/WD-MyPassport2628-01/FRITZ/IMG_20211231_154158.jpg
747 WD-MyPassport2628-01/WD-MyPassport2628-01/FRITZ/IMG_20211231_154158.jpg.supplemental-metadata.json
474106 WD-MyPassport2628-01/WD-MyPassport2628-01/WD-MyPassport2628-01/WD-MyPassport2628-01/FRITZ/IMG_20211231_154158.jpg
747 WD-MyPassport2628-01/WD-MyPassport2628-01/WD-MyPassport2628-01/WD-MyPassport2628-01/FRITZ/IMG_20211231_154158.jpg.supplemental-metadata.json
474106 WD-MyPassport2628-01/WD-MyPassport2628-01/WD-MyPassport2628-01/WD-MyPassport2628-01/WD-MyPassport2628-01/FRITZ/IMG_20211231_154158.jpg
747 WD-MyPassport2628-01/WD-MyPassport2628-01/WD-MyPassport2628-01/WD-MyPassport2628-01/WD-MyPassport2628-01/FRITZ/IMG_20211231_154158.jpg.supplemental-metadata.json
474106 WD-MyPassport2628-01/WD-MyPassport2628-01/WD-MyPassport2628-01/WD-MyPassport2628-01/WD-MyPassport2628-01/WD-MyPassport2628-01/WD-MyPassport2628-01/FRITZ/IMG_20211231_154158.jpg
747 WD-MyPassport2628-01/WD-MyPassport2628-01/WD-MyPassport2628-01/WD-MyPassport2628-01/WD-MyPassport2628-01/WD-MyPassport2628-01/WD-MyPassport2628-01/FRITZ/IMG_20211231_154158.jpg.supplemental-metadata.json
....Aborted
rclone version
rclone v1.75.2
- os/version: raspbian 13.7 (64 bit)
- os/kernel: 6.18.60+rpt-rpi-v8 (aarch64)
- os/type: linux
- os/arch: arm64 (ARMv8 compatible)
- go/version: go1.26.9
- go/linking: static
- go/tags: none
Operating system
Linux
Which cloud storage system are you using?
local disk, ftp (AVM FritzBox)
Output of rclone config redacted
[BG_SSH]
type = sftp
host = XXX
key_pem = XXX
shell_type = unix
md5sum_command = md5sum
sha1sum_command = sha1sum
user = XXX
[DW_SSH]
type = sftp
host = XXX
key_pem = XXX
shell_type = unix
md5sum_command = md5sum
sha1sum_command = sha1sum
[Hdd]
type = smb
host = XXX
user = XXX
pass = XXX
[SMB_BG]
type = smb
host = XXX
user = XXX
pass = XXX
[ftp]
type = ftp
host = XXX
user = XXX
pass = XXXThe command you were trying to run
sudo rclone lsd ftp:/WD-MyPassport2628-01/backup/Nextcloud --ftp-force-list-hidden -vvA log from the command with the -vv flag
2026/11/12 11:34:11 DEBUG : rclone: Version "v1.75.2" starting with parameters ["rclone" "lsd" "ftp:/WD-MyPassport2628-01/backup/Nextcloud" "--ftp-force-list-hidden" "-vv"]
2026/11/12 11:34:11 DEBUG : Creating backend with remote "ftp:/WD-MyPassport2628-01/backup/Nextcloud"
2026/11/12 11:34:11 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"
2026/11/12 11:34:11 DEBUG : ftp: detected overridden config - adding "{Sn4gH}" suffix to name
2026/11/12 11:34:11 DEBUG : ftp://192.168.27.1:21/WD-MyPassport2628-01/backup/Nextcloud: Connecting to FTP server
2026/11/12 11:34:11 DEBUG : ftp://192.168.27.1:21/WD-MyPassport2628-01/backup/Nextcloud: dial("tcp","192.168.27.1:21")
2026/11/12 11:34:11 DEBUG : ftp://192.168.27.1:21/WD-MyPassport2628-01/backup/Nextcloud: > dial: conn=192.168.46.2:38430->192.168.27.1:21, err=<nil>
2026/11/12 11:34:12 DEBUG : ftp://192.168.27.1:21/WD-MyPassport2628-01/backup/Nextcloud: dial("tcp","192.168.27.1:49915")
2026/11/12 11:34:12 DEBUG : ftp://192.168.27.1:21/WD-MyPassport2628-01/backup/Nextcloud: > dial: conn=192.168.46.2:40096->192.168.27.1:49915, err=<nil>
2026/11/12 11:34:13 DEBUG : fs cache: renaming cache item "ftp:/WD-MyPassport2628-01/backup/Nextcloud" to be canonical "ftp{Sn4gH}:/WD-MyPassport2628-01/backup/Nextcloud"
2026/11/12 11:34:13 DEBUG : ftp://192.168.27.1:21/WD-MyPassport2628-01/backup/Nextcloud: dial("tcp","192.168.27.1:52299")
2026/11/12 11:34:13 DEBUG : ftp://192.168.27.1:21/WD-MyPassport2628-01/backup/Nextcloud: > dial: conn=192.168.46.2:49192->192.168.27.1:52299, err=<nil>
-1 2025-03-16 01:00:00 -1 FRITZ
-1 2026-11-12 11:16:00 -1 WD-MyPassport2628-01
-1 2026-11-03 11:23:00 -1 media
2026/11/12 11:34:13 DEBUG : 3 go routines active
2026/11/12 11:34:13 DEBUG : ftp://192.168.27.1:21/WD-MyPassport2628-01/backup/Nextcloud: closing 1 unused connectionsAnything else?
No response
Activity
sathvik8317 commentedon Nov 13, 2026
Hi, I'd like to work on this.
From the code: with
--ftp-force-list-hiddenset, rclone skips MLSD and the jlaffaye/ftp library sendsLIST -a <path>(ServerConn.Listin ftp.go). My guess is the FritzBox FTP server takes-aas the argument and drops the path, so every directory returns the root listing. That would also explain thelsoutput: each subdirectory "contains" the root again, so the recursion keeps nestingWD-MyPassport2628-01/....@giteichi could you check this with curl, which lets you send a custom list command?
curl -u USER --list-only -X "LIST -a /WD-MyPassport2628-01/backup/Nextcloud" ftp://192.168.27.1/LIST -awith no path (curl does the CWD from the URL):curl -u USER --list-only -X "LIST -a" ftp://192.168.27.1/WD-MyPassport2628-01/backup/Nextcloud/Does (1) show the root and (2) show the Nextcloud folder?
If so, my plan is:
force_list_hiddenis on, CWD into the directory and sendLIST -awithout a path. Pooled connections would need to go back to a known directory afterwards, so nothing else that relies on the current directory breaks.-a, so this is covered.@ncw does that sound OK, and would you rather have the fix in the ftp backend or upstream in jlaffaye/ftp?
giteichi commentedon Nov 16, 2026
@sathvik8317 you guessed right.
(1) shows the root and (2) the Nextcloud folder!
Trying a test build should be no problem.
Thanks in advance!
Please feel free to get in touch, if you need further information!
sathvik8317 commentedon Nov 17, 2026
Thanks @giteichi, that confirms it: the server ignores the path after
LIST -a.I'll start on the fix in the ftp backend (CWD into the folder,
LIST -awith no path, then go back to the original dir on the pooled connection) and post a test build here when it's ready.@ncw I'm going with the backend fix unless you'd rather have it upstream in jlaffaye/ftp.
sathvik8317 commentedon Nov 17, 2026
@giteichi the fix is in #10380, and test builds are here: https://github.com/sathvik8317/rclone/releases/tag/test-10324 (Windows and Linux, amd64). Which OS are you on? If you need another one (macOS, ARM, e.g. a Raspberry Pi), tell me and I'll add it.
Could you run the same commands as before with this build and
--ftp-force-list-hidden, e.g.rclone lsd --ftp-force-list-hidden <remote>:WD-MyPassport2628-01/backup/Nextcloudrclone ls --ftp-force-list-hidden <remote>:WD-MyPassport2628-01/backup/NextcloudThe first should show the folders inside Nextcloud (not the root), and the second should no longer nest
WD-MyPassport2628-01/...forever. Hidden files (dotfiles) should show up too.giteichi commentedon Nov 18, 2026
Amazing job!
Tested with Debian 13.0.
Now everything works like expected.
Thank you very much!