All RC requests unauthorized with `--rc-no-auth` set

What is the problem you are having with rclone?

Every RC request appears to be unauthorised when --rc-no-auth is set, whether using rclone rc... or curl.

What is your rclone version (output from rclone version)

rclone v1.56.0-DEV
- os/version: alpine 3.14.2 (64 bit)
- os/kernel: 5.4.0-77-generic (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.16.8
- go/linking: dynamic
- go/tags: none

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

Google Drive (+ Union)

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

Mount:

/usr/sbin/rclone mount \
--fast-list  \
--allow-other  \
--allow-non-empty  \
--umask 000  \
--uid 65534  \
--gid 65534 -v  \
--checkers 12  \
--buffer-size 16M  \
--transfers 12  \
--use-mmap  \
--vfs-cache-mode writes  \
--poll-interval 120s  \
--attr-timeout 8700h  \
--dir-cache-time 8760h  \
--vfs-read-chunk-size 1M  \
--vfs-read-chunk-size-limit 4G  \
--vfs-cache-poll-interval 20m  \
--vfs-cache-max-age 168h  \
--vfs-cache-max-size 50G  \
--cache-dir=/shared/caches/rclone_vfs/  \
--low-level-retries 3  \
--multi-thread-cutoff 25M  \
--multi-thread-streams 8  \
--no-update-modtime  \
--rc-addr=0.0.0.0:5572  \
--drive-service-account-file /service_accounts/rclone_mount_download.json  \
--rc-no-auth \
--rc-web-gui  \
--rc-serve  \
--rc-enable-metrics  \
--rc-web-gui-no-open-browser  \
--rc union: /shared/merged

Command:

2021/09/14 00:24:03 DEBUG : rclone: Version "v1.56.0-DEV" starting with parameters ["rclone" "-vv" "rc" "rc/noop"]
2021/09/14 00:24:03 DEBUG : 4 go routines active
2021/09/14 00:24:03 Failed to rc: Failed to read rc response: 401 Unauthorized: Unauthorized

With --rc-no-auth removed and --rc-user admin --rc-user admin added to the mount and rc command, it works:

2021/09/14 00:22:13 DEBUG : rclone: Version "v1.56.0-DEV" starting with parameters ["rclone" "rc" "--rc-user" "admin" "--rc-pass" "admin" "rc/noop" "-vv"]
{}
2021/09/14 00:22:13 DEBUG : 4 go routines active

The rclone config contents with secrets removed.

My particular config is stupidly long and I don't think it's really relevant to this issue. Let me know if I'm wrong!

A log from the command with the -vv flag

The main mount log doesn't appear to output anything when you hit RC (even with -vv). The commands output above have -vv enabled.

Most likely you need to clear your browser cache.

This isn't related to the web UI, this is rclone rc commands.

Can you run a command with debug and share the log?

I'm not sure I understand. All commands in my post were ran with -vv, and the mount outputs nothing related to the RC request if it's unauthorised.

Mount logs:

rclone_1    | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
rclone_1    | [s6-init] ensuring user provided files have correct perms...exited 0.
rclone_1    | [fix-attrs.d] applying ownership & permissions fixes...
rclone_1    | [fix-attrs.d] done.
rclone_1    | [cont-init.d] executing container initialization scripts...
rclone_1    | [cont-init.d] 20-init: executing...
rclone_1    | [cont-init.d] 20-init: exited 0.
rclone_1    | [cont-init.d] done.
rclone_1    | [services.d] starting services
rclone_1    | [services.d] done.
rclone_1    | [services.d] [rclone-mount]-run: starting rclone mount 2021.09.14-00:49:57
rclone_1    |   /usr/sbin/rclone mount --fast-list --allow-other --allow-non-empty --umask 000 --uid 65534 --gid 65534 -vv --timeout 1h --checkers 12 --buffer-size 16M --transfers 12 --use-mmap --vfs-cache-mode writes --poll-interval 120s --attr-timeout 8700h --dir-cache-time 8760h --vfs-read-chunk-size 1M --vfs-read-chunk-size-limit 4G --vfs-cache-poll-interval 20m --vfs-cache-max-age 168h --vfs-cache-max-size 50G --cache-dir=/shared/caches/rclone_vfs/ --low-level-retries 3 --multi-thread-cutoff 25M --multi-thread-streams 8 --no-update-modtime --rc-addr=0.0.0.0:5572 --drive-service-account-file /service_accounts/rclone_mount_download.json --rc-no-auth --rc-web-gui --rc-serve --rc-enable-metrics --rc-web-gui-no-open-browser --rc union: /shared/merged
rclone_1    | 2021/09/14 00:49:57 DEBUG : rclone: Version "v1.56.0-DEV" starting with parameters ["/usr/sbin/rclone" "mount" "--fast-list" "--allow-other" "--allow-non-empty" "--umask" "000" "--uid" "65534" "--gid" "65534" "-vv" "--timeout" "1h" "--checkers" "12" "--buffer-size" "16M" "--transfers" "12" "--use-mmap" "--vfs-cache-mode" "writes" "--poll-interval" "120s" "--attr-timeout" "8700h" "--dir-cache-time" "8760h" "--vfs-read-chunk-size" "1M" "--vfs-read-chunk-size-limit" "4G" "--vfs-cache-poll-interval" "20m" "--vfs-cache-max-age" "168h" "--vfs-cache-max-size" "50G" "--cache-dir=/shared/caches/rclone_vfs/" "--low-level-retries" "3" "--multi-thread-cutoff" "25M" "--multi-thread-streams" "8" "--no-update-modtime" "--rc-addr=0.0.0.0:5572" "--drive-service-account-file" "/service_accounts/rclone_mount_download.json" "--rc-no-auth" "--rc-web-gui" "--rc-serve" "--rc-enable-metrics" "--rc-web-gui-no-open-browser" "--rc" "union:" "/shared/merged"]
rclone_1    | 2021/09/14 00:49:57 DEBUG : Current tag: v2.0.5, Release tag: v2.0.5
rclone_1    | 2021/09/14 00:49:57 NOTICE: Web GUI exists. Update skipped.
rclone_1    | 2021/09/14 00:49:57 INFO  : Cannot run Web GUI without authentication, using default auth
rclone_1    | 2021/09/14 00:49:57 INFO  : No username specified. Using default username: gui
rclone_1    | 2021/09/14 00:49:57 INFO  : No password specified. Using random password: FP3kqT-e5RPWpYI5lfu3tQ
rclone_1    | 2021/09/14 00:49:57 NOTICE: Serving Web GUI
rclone_1    | 2021/09/14 00:49:57 INFO  : Using --user gui --pass XXXX as authenticated user
rclone_1    | 2021/09/14 00:49:57 NOTICE: Serving remote control on http://0.0.0.0:5572/
rclone_1    | 2021/09/14 00:49:57 DEBUG : login_token "xxx"
rclone_1    | 2021/09/14 00:49:57 NOTICE: Web GUI is not automatically opening browser. Navigate to xxx to use.
rclone_1    | 2021/09/14 00:49:57 DEBUG : Creating backend with remote "union:"
rclone_1    | 2021/09/14 00:49:57 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"
rclone_1    | 2021/09/14 00:49:57 DEBUG : Creating backend with remote "gdrive_mount_crypt_4:/"
rclone_1    | 2021/09/14 00:49:57 DEBUG : Creating backend with remote "gdrive_mount_crypt_1:/"
rclone_1    | 2021/09/14 00:49:57 DEBUG : Creating backend with remote "gdrive_mount_crypt_2:/"
rclone_1    | 2021/09/14 00:49:57 DEBUG : Creating backend with remote "gdrive_mount_crypt_3:/"
rclone_1    | 2021/09/14 00:49:57 DEBUG : Creating backend with remote "/shared/separate/"
rclone_1    | 2021/09/14 00:49:57 DEBUG : Creating backend with remote "gdrive_mount_crypt_0:/"
rclone_1    | 2021/09/14 00:49:57 DEBUG : Creating backend with remote "/shared/separate"
rclone_1    | 2021/09/14 00:49:57 DEBUG : Creating backend with remote "gcache_4:/"
rclone_1    | 2021/09/14 00:49:57 NOTICE: WARNING: Cache backend is deprecated and may be removed in future. Please use VFS instead.
rclone_1    | 2021/09/14 00:49:57 DEBUG : Creating backend with remote "gcache_3:/"
rclone_1    | 2021/09/14 00:49:57 DEBUG : Creating backend with remote "gcache_0:/"
rclone_1    | 2021/09/14 00:49:57 DEBUG : Creating backend with remote "gcache_1:/"
rclone_1    | 2021/09/14 00:49:57 DEBUG : Creating backend with remote "gdrive_3:/encrypted"
rclone_1    | 2021/09/14 00:49:57 DEBUG : gdrive_3: detected overridden config - adding "{7Vdjy}" suffix to name
rclone_1    | 2021/09/14 00:49:57 DEBUG : Creating backend with remote "gdrive_0:/encrypted"
rclone_1    | 2021/09/14 00:49:57 DEBUG : gdrive_0: detected overridden config - adding "{7Vdjy}" suffix to name
rclone_1    | 2021/09/14 00:49:57 DEBUG : Creating backend with remote "gdrive_4:/encrypted"
rclone_1    | 2021/09/14 00:49:57 DEBUG : gdrive_4: detected overridden config - adding "{7Vdjy}" suffix to name
rclone_1    | 2021/09/14 00:49:57 DEBUG : Creating backend with remote "gdrive_1:/encrypted"
rclone_1    | 2021/09/14 00:49:57 DEBUG : gdrive_1: detected overridden config - adding "{7Vdjy}" suffix to name
rclone_1    | 2021/09/14 00:49:57 DEBUG : Creating backend with remote "gcache_2:/"
rclone_1    | 2021/09/14 00:49:57 DEBUG : Creating backend with remote "gdrive_2:/encrypted"
rclone_1    | 2021/09/14 00:49:57 DEBUG : gdrive_2: detected overridden config - adding "{7Vdjy}" suffix to name
rclone_1    | 2021/09/14 00:49:58 DEBUG : fs cache: renaming cache item "gdrive_0:/encrypted" to be canonical "gdrive_0{7Vdjy}:encrypted"
rclone_1    | 2021/09/14 00:49:58 DEBUG : gcache_0: wrapped gdrive_0{7Vdjy}:encrypted at root
rclone_1    | 2021/09/14 00:49:58 INFO  : gcache_0: Cache DB path: /shared/caches/gcache_0/db_path/gcache_0.db
rclone_1    | 2021/09/14 00:49:58 INFO  : gcache_0: Cache chunk path: /shared/caches/gcache_0/chunk_path/gcache_0
rclone_1    | 2021/09/14 00:49:58 DEBUG : fs cache: renaming cache item "gdrive_2:/encrypted" to be canonical "gdrive_2{7Vdjy}:encrypted"
rclone_1    | 2021/09/14 00:49:58 DEBUG : gcache_2: wrapped gdrive_2{7Vdjy}:encrypted at root
rclone_1    | 2021/09/14 00:49:58 INFO  : gcache_2: Cache DB path: /shared/caches/gcache_2/db_path/gcache_2.db
rclone_1    | 2021/09/14 00:49:58 INFO  : gcache_2: Cache chunk path: /shared/caches/gcache_2/chunk_path/gcache_2
rclone_1    | 2021/09/14 00:49:58 INFO  : gcache_0: Chunk Memory: true
rclone_1    | 2021/09/14 00:49:58 INFO  : gcache_0: Chunk Size: 5Mi
rclone_1    | 2021/09/14 00:49:58 INFO  : gcache_0: Chunk Total Size: 10Gi
rclone_1    | 2021/09/14 00:49:58 INFO  : gcache_0: Chunk Clean Interval: 1m0s
rclone_1    | 2021/09/14 00:49:58 INFO  : gcache_0: Workers: 12
rclone_1    | 2021/09/14 00:49:58 INFO  : gcache_0: File Age: 12.083333333333334M
rclone_1    | 2021/09/14 00:49:58 DEBUG : Creating backend with remote "/shared/caches/gcache_0/tmp_upload_path/"
rclone_1    | 2021/09/14 00:49:58 INFO  : gcache_2: Chunk Memory: true
rclone_1    | 2021/09/14 00:49:58 INFO  : gcache_2: Chunk Size: 5Mi
rclone_1    | 2021/09/14 00:49:58 INFO  : gcache_2: Chunk Total Size: 10Gi
rclone_1    | 2021/09/14 00:49:58 INFO  : gcache_2: Chunk Clean Interval: 1m0s
rclone_1    | 2021/09/14 00:49:58 INFO  : gcache_2: Workers: 12
rclone_1    | 2021/09/14 00:49:58 INFO  : gcache_2: File Age: 12.083333333333334M
rclone_1    | 2021/09/14 00:49:58 INFO  : gcache_0: Upload Temp Rest Time: 15s
rclone_1    | 2021/09/14 00:49:58 INFO  : gcache_0: Upload Temp FS: /shared/caches/gcache_0/tmp_upload_path/
rclone_1    | 2021/09/14 00:49:58 DEBUG : fs cache: renaming cache item "gcache_0:/" to be canonical "gcache_0:"
rclone_1    | 2021/09/14 00:49:58 DEBUG : fs cache: switching user supplied name "gcache_0:/" for canonical name "gcache_0:"
rclone_1    | 2021/09/14 00:49:58 DEBUG : Creating backend with remote "gdrive_mount_crypt_0:"
rclone_1    | 2021/09/14 00:49:58 DEBUG : Creating backend with remote "/shared/caches/gcache_2/tmp_upload_path/"
rclone_1    | 2021/09/14 00:49:58 INFO  : gcache_2: Upload Temp Rest Time: 15s
rclone_1    | 2021/09/14 00:49:58 INFO  : gcache_2: Upload Temp FS: /shared/caches/gcache_2/tmp_upload_path/
rclone_1    | 2021/09/14 00:49:58 DEBUG : fs cache: renaming cache item "gcache_2:/" to be canonical "gcache_2:"
rclone_1    | 2021/09/14 00:49:58 DEBUG : fs cache: switching user supplied name "gcache_2:/" for canonical name "gcache_2:"
rclone_1    | 2021/09/14 00:49:58 DEBUG : Creating backend with remote "gdrive_mount_crypt_2:"
rclone_1    | 2021/09/14 00:49:58 DEBUG : fs cache: renaming cache item "gdrive_1:/encrypted" to be canonical "gdrive_1{7Vdjy}:encrypted"
rclone_1    | 2021/09/14 00:49:58 DEBUG : gcache_1: wrapped gdrive_1{7Vdjy}:encrypted at root
rclone_1    | 2021/09/14 00:49:58 INFO  : gcache_1: Cache DB path: /shared/caches/gcache_1/db_path/gcache_1.db
rclone_1    | 2021/09/14 00:49:58 INFO  : gcache_1: Cache chunk path: /shared/caches/gcache_1/chunk_path/gcache_1
rclone_1    | 2021/09/14 00:49:58 INFO  : gcache_1: Chunk Memory: true
rclone_1    | 2021/09/14 00:49:58 INFO  : gcache_1: Chunk Size: 5Mi
rclone_1    | 2021/09/14 00:49:58 INFO  : gcache_1: Chunk Total Size: 10Gi
rclone_1    | 2021/09/14 00:49:58 INFO  : gcache_1: Chunk Clean Interval: 1m0s
rclone_1    | 2021/09/14 00:49:58 INFO  : gcache_1: Workers: 12
rclone_1    | 2021/09/14 00:49:58 INFO  : gcache_1: File Age: 12.083333333333334M
rclone_1    | 2021/09/14 00:49:58 DEBUG : Creating backend with remote "/shared/caches/gcache_1/tmp_upload_path/"
rclone_1    | 2021/09/14 00:49:58 INFO  : gcache_1: Upload Temp Rest Time: 15s
rclone_1    | 2021/09/14 00:49:58 INFO  : gcache_1: Upload Temp FS: /shared/caches/gcache_1/tmp_upload_path/
rclone_1    | 2021/09/14 00:49:58 DEBUG : fs cache: renaming cache item "gcache_1:/" to be canonical "gcache_1:"
rclone_1    | 2021/09/14 00:49:58 DEBUG : fs cache: switching user supplied name "gcache_1:/" for canonical name "gcache_1:"
rclone_1    | 2021/09/14 00:49:58 DEBUG : Creating backend with remote "gdrive_mount_crypt_1:"
rclone_1    | 2021/09/14 00:49:58 DEBUG : fs cache: switching user supplied name "gcache_0:/" for canonical name "gcache_0:"
rclone_1    | 2021/09/14 00:49:58 DEBUG : fs cache: switching user supplied name "gcache_2:/" for canonical name "gcache_2:"
rclone_1    | 2021/09/14 00:49:58 DEBUG : fs cache: switching user supplied name "gcache_1:/" for canonical name "gcache_1:"
rclone_1    | 2021/09/14 00:49:58 DEBUG : fs cache: renaming cache item "gdrive_3:/encrypted" to be canonical "gdrive_3{7Vdjy}:encrypted"
rclone_1    | 2021/09/14 00:49:58 DEBUG : gcache_3: wrapped gdrive_3{7Vdjy}:encrypted at root
rclone_1    | 2021/09/14 00:49:58 INFO  : gcache_3: Cache DB path: /shared/caches/gcache_3/db_path/gcache_3.db
rclone_1    | 2021/09/14 00:49:58 INFO  : gcache_3: Cache chunk path: /shared/caches/gcache_3/chunk_path/gcache_3
rclone_1    | 2021/09/14 00:49:58 INFO  : gcache_3: Chunk Memory: true
rclone_1    | 2021/09/14 00:49:58 INFO  : gcache_3: Chunk Size: 5Mi
rclone_1    | 2021/09/14 00:49:58 INFO  : gcache_3: Chunk Total Size: 10Gi
rclone_1    | 2021/09/14 00:49:58 INFO  : gcache_3: Chunk Clean Interval: 1m0s
rclone_1    | 2021/09/14 00:49:58 INFO  : gcache_3: Workers: 12
rclone_1    | 2021/09/14 00:49:58 INFO  : gcache_3: File Age: 12.083333333333334M
rclone_1    | 2021/09/14 00:49:58 DEBUG : Creating backend with remote "/shared/caches/gcache_3/tmp_upload_path/"
rclone_1    | 2021/09/14 00:49:58 INFO  : gcache_3: Upload Temp Rest Time: 15s
rclone_1    | 2021/09/14 00:49:58 INFO  : gcache_3: Upload Temp FS: /shared/caches/gcache_3/tmp_upload_path/
rclone_1    | 2021/09/14 00:49:58 DEBUG : fs cache: renaming cache item "gcache_3:/" to be canonical "gcache_3:"
rclone_1    | 2021/09/14 00:49:58 DEBUG : fs cache: switching user supplied name "gcache_3:/" for canonical name "gcache_3:"
rclone_1    | 2021/09/14 00:49:58 DEBUG : Creating backend with remote "gdrive_mount_crypt_3:"
rclone_1    | 2021/09/14 00:49:58 DEBUG : fs cache: switching user supplied name "gcache_3:/" for canonical name "gcache_3:"
rclone_1    | 2021/09/14 00:49:58 DEBUG : fs cache: renaming cache item "gdrive_4:/encrypted" to be canonical "gdrive_4{7Vdjy}:encrypted"
rclone_1    | 2021/09/14 00:49:58 DEBUG : gcache_4: wrapped gdrive_4{7Vdjy}:encrypted at root
rclone_1    | 2021/09/14 00:49:58 INFO  : gcache_4: Cache DB path: /shared/caches/gcache_4/db_path/gcache_4.db
rclone_1    | 2021/09/14 00:49:58 INFO  : gcache_4: Cache chunk path: /shared/caches/gcache_4/chunk_path/gcache_4
rclone_1    | 2021/09/14 00:49:58 INFO  : gcache_4: Chunk Memory: true
rclone_1    | 2021/09/14 00:49:58 INFO  : gcache_4: Chunk Size: 5Mi
rclone_1    | 2021/09/14 00:49:58 INFO  : gcache_4: Chunk Total Size: 10Gi
rclone_1    | 2021/09/14 00:49:58 INFO  : gcache_4: Chunk Clean Interval: 1m0s
rclone_1    | 2021/09/14 00:49:58 INFO  : gcache_4: Workers: 12
rclone_1    | 2021/09/14 00:49:58 INFO  : gcache_4: File Age: 12.083333333333334M
rclone_1    | 2021/09/14 00:49:58 DEBUG : Creating backend with remote "/shared/caches/gcache_4/tmp_upload_path/"
rclone_1    | 2021/09/14 00:49:58 INFO  : gcache_4: Upload Temp Rest Time: 15s
rclone_1    | 2021/09/14 00:49:58 INFO  : gcache_4: Upload Temp FS: /shared/caches/gcache_4/tmp_upload_path/
rclone_1    | 2021/09/14 00:49:58 DEBUG : fs cache: renaming cache item "gcache_4:/" to be canonical "gcache_4:"
rclone_1    | 2021/09/14 00:49:58 DEBUG : fs cache: switching user supplied name "gcache_4:/" for canonical name "gcache_4:"
rclone_1    | 2021/09/14 00:49:58 DEBUG : Creating backend with remote "gdrive_mount_crypt_4:"
rclone_1    | 2021/09/14 00:49:58 DEBUG : fs cache: switching user supplied name "gcache_4:/" for canonical name "gcache_4:"
rclone_1    | 2021/09/14 00:49:58 DEBUG : union root '': actionPolicy = *policy.EpAll, createPolicy = *policy.FF, searchPolicy = *policy.FF
rclone_1    | 2021/09/14 00:49:58 INFO  : union root '': poll-interval is not supported by this remote
rclone_1    | 2021/09/14 00:49:58 DEBUG : vfs cache: root is "/shared/caches/rclone_vfs/vfs/union"
rclone_1    | 2021/09/14 00:49:58 DEBUG : vfs cache: metadata root is "/shared/caches/rclone_vfs/vfs/union"
rclone_1    | 2021/09/14 00:49:58 DEBUG : Creating backend with remote "/shared/caches/rclone_vfs/vfs/union"
rclone_1    | 2021/09/14 00:49:58 DEBUG : union root '': Mounting on "/shared/merged"
rclone_1    | 2021/09/14 00:49:58 INFO  : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
rclone_1    | 2021/09/14 00:49:58 DEBUG : : Root:
rclone_1    | 2021/09/14 00:49:58 DEBUG : : >Root: node=/, err=<nil>
<<RC COMMAND RAN HERE, NO LOG OUTPUT FROM THE MOUNT>>

RC command in another window:

bash-5.1# rclone rc -vv rc/noop
2021/09/14 00:50:13 DEBUG : rclone: Version "v1.56.0-DEV" starting with parameters ["rclone" "rc" "-vv" "rc/noop"]
2021/09/14 00:50:13 DEBUG : 4 go routines active
2021/09/14 00:50:13 Failed to rc: Failed to read rc response: 401 Unauthorized: Unauthorized

I believe it's because you are using the WebGUI along with the remote control daemon which requires a password.

It's easy to test as if you remove the webgui, you'll see it works.

1 Like

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