I can list all bucket , but when I try to list a specific bucket I am getting " Failed to ls: directory not found"

STOP and READ USE THIS TEMPLATE NO EXCEPTIONS - By not using this, you waste your time, our time and really hate puppies. Please remove these two lines and that will confirm you have read them.

What is the problem you are having with rclone?

...
I can list all bucket , but when I try to list a specific bucket I am getting
" Failed to ls: directory not found"
...

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

...
./rclone version
rclone v1.67.0

  • os/version: Microsoft Windows Server 2019 Datacenter 1809 (64 bit)
  • os/kernel: 10.0.17763.2565 (x86_64)
  • os/type: windows
  • os/arch: amd64
  • go/version: go1.22.4
  • go/linking: static
  • go/tags: cmount
    ...

yes 167.0

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

AWS S3

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

.\rclone.exe lsd  mobisoft-prd-arch:tempmobi --no-check-certificate -vv

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

./rclone config redacted
[mobisoft-prd-arch]
type = s3
provider = AWS
access_key_id = XXX
secret_access_key = XXX
region = eu-west-1
endpoint = https://vpce-0a28a80535397ed8a-q6v00xma.s3.eu-west-1.vpce.amazonaws.com
location_constraint = eu-west-1
storage_class = STANDARD
acl = bucket-owner-full-control

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

.\rclone.exe ls  mobisoft-prd-arch:tempmobi --no-check-certificate -vv
2024/07/24 11:55:48 DEBUG : rclone: Version "v1.67.0" starting with parameters ["C:\\rclone\\rclone.exe" "ls" "mobisoft-prd-arch:tempmobi" "--no-check-certificate" "-vv"]
2024/07/24 11:55:48 DEBUG : Creating backend with remote "mobisoft-prd-arch:tempmobi"
2024/07/24 11:55:48 DEBUG : Using config file from "C:\\Users\\t108_admin\\AppData\\Roaming\\rclone\\rclone.conf"
2024/07/24 11:55:48 DEBUG : Resolving service "s3" region "eu-west-1"
2024/07/24 11:55:48 DEBUG : 4 go routines active
2024/07/24 11:55:48 Failed to ls: directory not found

And what:

.\rclone.exe lsd mobisoft-prd-arch: --no-check-certificate -vv

shows?

.\rclone.exe lsd mobisoft-prd-arch: --no-check-certificate -vv
2024/07/24 14:18:53 DEBUG : rclone: Version "v1.67.0" starting with parameters ["C:\rclone\rclone.exe" "lsd" "mobisoft-prd-arch:" "--no-check-certificate" "-vv"]
2024/07/24 14:18:53 DEBUG : Creating backend with remote "mobisoft-prd-arch:"
2024/07/24 14:18:53 DEBUG : Using config file from "C:\Users\t108_admin\AppData\Roaming\rclone\rclone.conf"
2024/07/24 14:18:53 DEBUG : Resolving service "s3" region "eu-west-1"
-1 2023-08-28 11:48:20 -1 aoutoma
-1 2021-03-07 17:20:49 -1 aws-cloudtrail-logs-669216315554-a7ceabd6
-1 2024-06-10 13:06:14 -1 backup-hana-tnuva-prod
-1 2023-03-29 15:19:33 -1 bartenderalb
-1 2022-12-29 15:29:25 -1 bi-sbf-ds
-1 2022-11-27 13:25:27 -1 cdk-hnb659fds-assets-669216315554-eu-west-1
-1 2020-08-16 14:45:49 -1 cf-templates-7w5v0natuc2k-eu-west-1
-1 2020-08-27 07:59:58 -1 config-bucket-669216315554
-1 2021-05-24 10:49:07 -1 cost-usage-prod-24-052021
-1 2021-09-01 15:17:54 -1 installs-sap-prod-tnuva
-1 2022-09-12 09:57:19 -1 mobisoft-prd-arch
-1 2024-06-16 18:16:47 -1 mobisoft-prd1
-1 2022-06-29 11:46:37 -1 oracle-rds-sftnv
-1 2023-06-04 16:12:55 -1 programs-deployment
-1 2022-09-01 10:14:09 -1 siemense-automha
-1 2023-12-10 12:14:39 -1 ssm-deploy1
-1 2021-06-14 12:18:14 -1 success-factors-audit
-1 2024-07-23 17:53:36 -1 tempmobi
-1 2021-12-07 14:10:59 -1 tnuva-prod-vpc-flowlogs
2024/07/24 14:18:53 DEBUG : 4 go routines active

Can you list this bucket using other tools? E.g. aws cli?

I suspect that there is no problem with rclone but your buckets have some restrictive policies in place and credentials you use are not allowed to list anything below "root" level.

Hi , Thank you Kapitainsky.

here is an aws s3 command that shows my the tempmobi bucket files
...
aws s3 ls s3://tempmobi --region eu-west-1 --endpoint-url https://vpce-0a28a80535397ed8a-q6v00xma.s3.eu-west-1.vpce.amazonaws.com --no-verify-ssl
...
and i can see the files in it .
When I run the rclon command
...
.\rclone.exe lsd mobisoft-prd-arch:tempmobi --no-check-certificate -vv
...
I am getting
...
2024/07/24 15:38:20 DEBUG : Creating backend with remote "mobisoft-prd-arch:tempmobi"
2024/07/24 15:38:20 DEBUG : Using config file from "C:\Users\t108_admin\AppData\Roaming\rclone\rclone.conf"
2024/07/24 15:38:20 DEBUG : Resolving service "s3" region "eu-west-1"
2024/07/24 15:38:20 ERROR : : error listing: directory not found
2024/07/24 15:38:20 DEBUG : 4 go routines active
2024/07/24 15:38:20 Failed to lsd with 2 errors: last error was: directory not found
...
B.R
Amit

@asdffdsa any idea what is going on here? Have you seen something similar?

hi @kapitainsky, not sure what is going on.

fwiw, i never use location_constraint on s3 provider and i know it has caused issues in the forum.
and as a small side note, using acl = is not recommended by AWS.
so as a test, i would remove both flags and try again.

tho it should not matter, i would also try testing without endpoint =

1 Like

I followed your instraction and I get the same resolute.

ok, based on that test, can you post

  • rclone config redacted
  • the full debug log.

and for a deeper look, can test using --dump=headers

...
C:\rclone>rclone config redacted
[mobi]
type = s3
provider = AWS
access_key_id = XXX
secret_access_key = XXX
region = eu-west-1
endpoint = vpce-0a28a80535397ed8a-q6v00xma.s3.eu-west-1.vpce.amazonaws.com
location_constraint = eu-west-1

[mobisoft-prd-arch]
type = s3
provider = AWS
access_key_id = XXX
secret_access_key = XXX
region = eu-west-1
endpoint = https://vpce-0a28a80535397ed8a-q6v00xma.s3.eu-west-1.vpce.amazonaws.com
location_constraint = eu-west-1

Double check the config for sensitive info before posting publicly

...
C:\rclone>.\rclone.exe lsd mobi:mobisoft-prd1 --no-check-certificate -vv --dump=headers
2024/07/24 17:29:29 DEBUG : rclone: Version "v1.67.0" starting with parameters [".\rclone.exe" "lsd" "mobi:mobisoft-prd1" "--no-check-certificate" "-vv" "--dump=headers"]
2024/07/24 17:29:29 DEBUG : Creating backend with remote "mobi:mobisoft-prd1"
2024/07/24 17:29:29 DEBUG : Using config file from "C:\Users\t108_admin\AppData\Roaming\rclone\rclone.conf"
2024/07/24 17:29:29 DEBUG : You have specified to dump information. Please be noted that the Accept-Encoding as shown may not be correct in the request and the response may not show Content-Encoding if the go standard libraries auto gzip encoding was in effect. In this case the body of the request will be gunzipped before showing it.
2024/07/24 17:29:29 DEBUG : Resolving service "s3" region "eu-west-1"
2024/07/24 17:29:29 DEBUG : You have specified to dump information. Please be noted that the Accept-Encoding as shown may not be correct in the request and the response may not show Content-Encoding if the go standard libraries auto gzip encoding was in effect. In this case the body of the request will be gunzipped before showing it.
2024/07/24 17:29:29 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2024/07/24 17:29:29 DEBUG : HTTP REQUEST (req 0xc00047aa20)
2024/07/24 17:29:29 DEBUG : GET /?delimiter=%2F&encoding-type=url&list-type=2&max-keys=1000&prefix= HTTP/1.1
Host: mobisoft-prd1.vpce-0a28a80535397ed8a-q6v00xma.s3.eu-west-1.vpce.amazonaws.com
User-Agent: rclone/v1.67.0
Authorization: XXXX
X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
X-Amz-Date: 20240724T142929Z
Accept-Encoding: gzip

2024/07/24 17:29:29 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2024/07/24 17:29:29 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2024/07/24 17:29:29 DEBUG : HTTP RESPONSE (req 0xc00047aa20)
2024/07/24 17:29:29 DEBUG : HTTP/1.1 404 Not Found
Transfer-Encoding: chunked
Content-Type: application/xml
Date: Wed, 24 Jul 2024 14:29:29 GMT
Server: AmazonS3
X-Amz-Id-2: CckMd0sx9W62iHyJEop9PnBlHlj2Rb59kDESTqntScJHe8XwSK43fOTjTSAGLI65SpiUlfT0WgU=
X-Amz-Request-Id: WEA76JQX16HBBM1N

2024/07/24 17:29:29 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2024/07/24 17:29:29 ERROR : : error listing: directory not found
2024/07/24 17:29:29 DEBUG : 4 go routines active
2024/07/24 17:29:29 Failed to lsd with 2 errors: last error was: directory not found
...

to be honest, no idea what the issue is.
do you have any custom IAM and/or bucket poliices?

maybe try --s3-no-check-bucket --s3-no-head --s3-no-head-object

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