404 Not Found: Nextcloud

What is the problem you are having with rclone?

rclone sees my file in my Nextcloud, but when trying to access it, I get a 404 - Not Found. This seems to only happen to this file that I share here. For other files, rclone and Nextcloud work perfectly.

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

rclone v1.59.2

  • os/version: darwin 12.4 (64 bit)
  • os/kernel: 21.5.0 (x86_64)
  • os/type: darwin
  • os/arch: amd64
  • go/version: go1.18.6
  • go/linking: dynamic
  • go/tags: cmount

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

Nextcloud

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

rclone copy nextcloud_ikiru:KeepassDatabase/Database.kdbx .

The rclone config contents with secrets removed.

"nextcloud_ikiru": {
        "pass": "<password>",
        "type": "webdav",
        "url": "https://<ddns-name>:<port>/remote.php/dav/files/ikiru/Local",
        "user": "ikiru",
        "vendor": "nextcloud"
    }

A log from the command with the -vv flag

➜  ~ rclone ls nextcloud_ikiru:KeepassDatabase -vv
2022/11/03 13:47:36 DEBUG : rclone: Version "v1.59.2" starting with parameters ["rclone" "ls" "nextcloud_ikiru:KeepassDatabase" "-vv"]
2022/11/03 13:47:36 DEBUG : Creating backend with remote "nextcloud_ikiru:KeepassDatabase"
2022/11/03 13:47:36 DEBUG : Using config file from "/Users/marcos/.config/rclone/rclone.conf"
2022/11/03 13:47:36 DEBUG : found headers:
    19246 Database.kdbx
     8135 groupxch/Passwords.kdbx
    16384 groupxch/pwfile.key
2022/11/03 13:47:38 DEBUG : 5 go routines active
➜  ~ rclone copy nextcloud_ikiru:KeepassDatabase/Database.kdbx . -vv
2022/11/03 13:51:01 DEBUG : rclone: Version "v1.59.2" starting with parameters ["rclone" "copy" "nextcloud_ikiru:KeepassDatabase/Database.kdbx" "." "-vv"]
2022/11/03 13:51:01 DEBUG : Creating backend with remote "nextcloud_ikiru:KeepassDatabase/Database.kdbx"
2022/11/03 13:51:01 DEBUG : Using config file from "/Users/marcos/.config/rclone/rclone.conf"
2022/11/03 13:51:01 DEBUG : found headers:
2022/11/03 13:51:02 DEBUG : fs cache: adding new entry for parent of "nextcloud_ikiru:KeepassDatabase/Database.kdbx", "nextcloud_ikiru:KeepassDatabase"
2022/11/03 13:51:02 DEBUG : Creating backend with remote "."
2022/11/03 13:51:02 DEBUG : fs cache: renaming cache item "." to be canonical "/Users/marcos"
2022/11/03 13:51:03 DEBUG : Database.kdbx: Need to transfer - File not found at Destination
2022/11/03 13:51:03 ERROR : Database.kdbx: Failed to copy: failed to open source object: Sabre\DAV\Exception\NotFound: 404 Not Found
2022/11/03 13:51:03 ERROR : Attempt 1/3 failed with 1 errors and: failed to open source object: Sabre\DAV\Exception\NotFound: 404 Not Found
2022/11/03 13:51:03 DEBUG : Database.kdbx: Need to transfer - File not found at Destination
2022/11/03 13:51:04 ERROR : Database.kdbx: Failed to copy: failed to open source object: Sabre\DAV\Exception\NotFound: 404 Not Found
2022/11/03 13:51:04 ERROR : Attempt 2/3 failed with 1 errors and: failed to open source object: Sabre\DAV\Exception\NotFound: 404 Not Found
2022/11/03 13:51:04 DEBUG : Database.kdbx: Need to transfer - File not found at Destination
2022/11/03 13:51:04 ERROR : Database.kdbx: Failed to copy: failed to open source object: Sabre\DAV\Exception\NotFound: 404 Not Found
2022/11/03 13:51:04 ERROR : Attempt 3/3 failed with 1 errors and: failed to open source object: Sabre\DAV\Exception\NotFound: 404 Not Found
2022/11/03 13:51:04 INFO  :
Transferred:   	          0 B / 0 B, -, 0 B/s, ETA -
Errors:                 1 (retrying may help)
Elapsed time:         2.6s

2022/11/03 13:51:04 DEBUG : 6 go routines active
2022/11/03 13:51:04 Failed to copy: failed to open source object: Sabre\DAV\Exception\NotFound: 404 Not Found

hi,
using the nextcloud client/app/website, can you manually download nextcloud_ikiru:KeepassDatabase/Database.kdbx

using rclone, if you try to download the entire directory nextcloud_ikiru:KeepassDatabase,
does nextcloud_ikiru:KeepassDatabase/Database.kdbx get downloaded?

Hi, thanks for asking.

When downloading from website, I get a "That file no longer exists" error (although I am seeing it). If I download the folder, all files and folder except this file get downloaded.

If I download the entire folder with rclone, everything gets downloaded except for this file.

need to fix that webdav server and then rclone should work

i would delete that file from nextcloud, re-upload it and test again

Really weird behaviour. I deleted the file and uploaded it from nextclouds ui and everything works nice. Must be something related to file ownership. My setup is nextcloud's docker image on top of wsl2, on top of windows - with a setup so weird, something must have gone wrong.

Edit:
the previous file was owned by root:root and had 000 permissions. Changing it to 777 permissions made no difference.
After uploading the file from ui, the file is owned by 33:xfs, with permissions 644