Rclone lists/copies everything despite using an specific path

What is the problem you are having with rclone?

I've attempted to run multiple different commands and they all seem to have the same behavior. When using comands like "lsd" or "copy" with an specified path/directory it lists everything from the root directory instead.

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

rclone v1.54.1

  • os/arch: linux/amd64
  • go version: go1.15.8

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

OneDrive for Business

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

rclone lsd remote:/test_folder/

The rclone config contents with secrets removed.

[remote]
type = onedrive
region = global
token = {"access_token":"*","token_type":"Bearer","refresh_token":"*","expiry":"*"}
drive_id = *
drive_type = business

A log from the command with the -vv flag

2023/04/26 13:52:59 DEBUG : rclone: Version "v1.54.1" starting with parameters ["rclone" "lsd" "remote:/test_folder/" "-vv"]
2023/04/26 13:52:59 DEBUG : Using config file from "/home/user/.config/rclone/rclone.conf"
2023/04/26 13:52:59 DEBUG : Creating backend with remote "remote:/test_folder/"
2023/04/26 13:53:00 DEBUG : fs cache: renaming cache item "remote:/test_folder/" to be canonical "remote:test_folder"
          -1 2023-03-09 13:42:17         1 videos
          -1 2023-02-23 12:32:01         1 documents
          -1 2022-03-24 11:50:49        37 test_folder
          -1 2023-02-23 14:46:31         2 misc
          -1 2021-10-01 15:14:31         8 others
          -1 2022-07-27 17:13:36         1 tmp
2023/04/26 13:53:00 DEBUG : 3 go routines active

hello and welcome to the forum,

from the template, need to update rclone and test again.


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

STOP and READ:
Do not type in "Latest".
Do not just type in a version number. Run the command and share the full output.

Are you on the latest version of rclone? You can validate by checking the version listed here: Rclone downloads

Hi, thanks for the quick response and sorry for not using the updated version.

But the problem is still present on v1.62.2. Here's the updated logs.

What is the problem you are having with rclone?

I've attempted to run multiple different commands and they all seem to have the same behavior. When using comands like "lsd" or "copy" with an specified path/directory it lists everything from the root directory instead.

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

rclone v1.62.2

  • os/version: ubuntu 18.04 (64 bit)
  • os/kernel: 5.4.0-1100-aws (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.20.2
  • go/linking: static
  • go/tags: none

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

OneDrive for Business

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

rclone lsd remote:/test_folder/

The rclone config contents with secrets removed.

[remote]
type = onedrive
region = global
token = {"access_token":"*","token_type":"Bearer","refresh_token":"*","expiry":"*"}
drive_id = *
drive_type = business

A log from the command with the -vv flag

2023/04/26 15:00:38 DEBUG : rclone: Version "v1.62.2" starting with parameters ["rclone" "lsd" "remote:/test_folder/" "-vv"]
2023/04/26 15:00:38 DEBUG : Creating backend with remote "remote:/test_folder/"
2023/04/26 15:00:38 DEBUG : Using config file from "/home/user/.config/rclone/rclone.conf"
2023/04/26 15:00:39 DEBUG : fs cache: renaming cache item "remote:/test_folder/" to be canonical "remote:test_folder"
          -1 2023-03-09 13:42:17         1 videos
          -1 2023-02-23 12:32:01         1 documents
          -1 2022-03-24 11:50:49        37 test_folder
          -1 2023-02-23 14:46:31         2 misc
          -1 2021-10-01 15:14:31         8 others
          -1 2022-07-27 17:13:36         1 tmp
2023/04/26 15:00:39 DEBUG : 3 go routines active

i see that you have two folders named test_folder?

that remote:test_folder/test_folder is a sub folder of remote:test_folder

Not really, that's the issue I'm having.

I am actually trying to list everything that's under "test_folder".

It does not matter if use this command

rclone lsd remote: 

Or this one

rclone lsd remote:/test_folder/

The output is always the same:
Command #1

2023/04/26 15:36:47 DEBUG : rclone: Version "v1.62.2" starting with parameters ["rclone" "lsd" "remote:" "-vv"]
2023/04/26 15:36:47 DEBUG : Creating backend with remote "remote:"
2023/04/26 15:36:47 DEBUG : Using config file from "/home/user/.config/rclone/rclone.conf"
          -1 2023-03-09 13:42:17         1 videos
          -1 2023-02-23 12:32:01         1 documents
          -1 2022-03-24 11:50:49        37 test_folder
          -1 2023-02-23 14:46:31         2 misc
          -1 2021-10-01 15:14:31         8 others
          -1 2022-07-27 17:13:36         1 tmp
2023/04/26 15:36:48 DEBUG : 3 go routines active 

Command #2

2023/04/26 15:00:38 DEBUG : rclone: Version "v1.62.2" starting with parameters ["rclone" "lsd" "remote:/test_folder/" "-vv"]
2023/04/26 15:00:38 DEBUG : Creating backend with remote "remote:/test_folder/"
2023/04/26 15:00:38 DEBUG : Using config file from "/home/user/.config/rclone/rclone.conf"
2023/04/26 15:00:39 DEBUG : fs cache: renaming cache item "remote:/test_folder/" to be canonical "remote:test_folder"
          -1 2023-03-09 13:42:17         1 videos
          -1 2023-02-23 12:32:01         1 documents
          -1 2022-03-24 11:50:49        37 test_folder
          -1 2023-02-23 14:46:31         2 misc
          -1 2021-10-01 15:14:31         8 others
          -1 2022-07-27 17:13:36         1 tmp
2023/04/26 15:00:39 DEBUG : 3 go routines active

Strange, what is the output of these commands:

rclone mkdir remote:test_folder2
rclone lsd remote: -vv
rclone lsd remote:test_folder -vv
1 Like

yes, that is strange.
i would take a look at onedrive website, to confirm.

1 Like

Here you go:

First one worked all right. I can see the folder in OneDrive website.

rclone mkdir remote:test_folder2 -vv
2023/04/26 15:50:16 DEBUG : rclone: Version "v1.62.2" starting with parameters ["rclone" "mkdir" "remote:test_folder2" "-vv"]
2023/04/26 15:50:16 DEBUG : Creating backend with remote "remote:test_folder2"
2023/04/26 15:50:16 DEBUG : Using config file from "/home/user/.config/rclone/rclone.conf"
2023/04/26 15:50:16 DEBUG : OneDrive root 'test_folder2': Making directory
2023/04/26 15:50:17 DEBUG : 5 go routines active
rclone lsd remote: -vv
2023/04/26 15:52:10 DEBUG : rclone: Version "v1.62.2" starting with parameters ["rclone" "lsd" "remote:" "-vv"]
2023/04/26 15:52:10 DEBUG : Creating backend with remote "remote:"
2023/04/26 15:52:10 DEBUG : Using config file from "/home/user/.config/rclone/rclone.conf"
          -1 2023-03-09 13:42:17         1 videos
          -1 2023-02-23 12:32:01         1 documents
          -1 2022-03-24 11:50:49        37 test_folder
          -1 2023-02-23 14:46:31         2 misc
          -1 2021-10-01 15:14:31         8 others
          -1 2023-04-26 15:50:17         0 test_folder2
          -1 2022-07-27 17:13:36         1 tmp
2023/04/26 15:52:11 DEBUG : 3 go routines active

Ok the following seems to be the expected output. There is no folders inside test_folder.

rclone lsd remote:test_folder -vv
2023/04/26 15:53:41 DEBUG : rclone: Version "v1.62.2" starting with parameters ["rclone" "lsd" "remote:test_folder" "-vv"]
2023/04/26 15:53:41 DEBUG : Creating backend with remote "remote:test_folder"
2023/04/26 15:53:41 DEBUG : Using config file from "/home/user/.config/rclone/rclone.conf"
2023/04/26 15:53:43 DEBUG : 3 go routines active

I have no clue what happened, but it seems to be working. Maybe the forward slash after the remote name is not supposed to be there? As in:

rclone lsd remote:/test_folder/

Instead of

rclone lsd remote:test_folder

I'll try to copy a random file and see if works as well.

1 Like

should not be the case, as rclone cleans that up for you.
renaming cache item "remote:/test_folder/" to be canonical "remote:test_folder"

Yep, good point!

Ok, as weird as it sounds everything is working properly now. Copying, listing, moving and everything else. With or without the forward slash.

So sorry I took your time guys, but I promise I've tried uninstalling and installing multiple times as well as configuring the remote from scratch.

To add a little bit of context here these tests I'm doing are on a remote machine via ssh. I'm not sure if it could be anything related to bash or something like that, but it took a couple of hours to miraculously start working again.

1 Like

good that it is working again.

the main thing is does not look like a rclone bug

1 Like

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