Successful Rclone Mount but can not see files

What is the problem you are having with rclone?

Installed rclone as a Docker’s container in Unraid, I successfully Rclone mount my Google Drive to a directory in local machine. Rclone is ran in Docker’s container. When I check the content of the mount point within container, files + folder are available but outside container, they are not existed even though volume mapping is correct.

Tried the same codes, same machine: Linux + Ubuntu + trueNAS work (files are visible) !!! unRAID failed.
In unRAID, only disk1 available without parity disk.

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

rclone v1.58.1

  • os/version: alpine 3.15.4 (64 bit)
  • os/kernel: 5.15.43-Unraid (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.18.1
  • go/linking: static
  • go/tags: none
YES

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

Google Drive without encrypt/decrypt.

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

#Volume mapping: /data  ->    mnt/disk1/unraid 
#First, I check if the mapping volume is correct or not:
root@Tower:~# ls /mnt/disk1/unraid/#directory in host to mount GG.
test.png                                                      #there is a file named test.png

root@Tower:~# docker exec -it 1e909e56f343 sh     #execute a command inside rclone container
/data # ls /data/                                          #list files in directory that map the container with host.
test.png                                                      #both host & container path has the same file.

/data # rm /data/test.png                    #Remove test.png to empty mount point 
/data #                                                      #file deleted
/data # exit	#exit rclone container

root@Tower:~# ls /mnt/disk1/unraid   #check if any file available
root@Tower:~#	#test.png deleted in host path, mount point is empty.

#after this step, I setup Google Drive authentication without encrypt/decrypt. No problem in this step.
#now I will check if rclone link with my GG drive.

root@Tower:~# docker exec -it 1e909e56f343 sh #execute a command inside rclone container
/data # rclone ls Gdrive:                        #list files in Gdrive connection (with my Google Drive)
       24 hello.rar                                       #found 1 file hello.rar. connection good.
/data # rclone copy Gdrive: /data       #try a copy from Gdrive: to /data. 
/data # exit
root@Tower:~# ls /mnt/disk1/unraid   #check if any file available
hello.rar		#found 1 file hello.rar in host directory.
root@Tower:~# rm /mnt/disk1/unraid/hello.rar   #delete hello.rar in host directory.
root@Tower:~# docker exec -it 1e909e56f343 sh #execute a command inside rclone container
/data # ls 	#check one more time in container.
/data #	#return nothing. Hello.rar is deleted.

#now I will setup rclone mount.

/data # rclone mount Gdrive:/ /data --vfs-cache-mode writes --daemon --allow-other --allow-root --allow-non-empty -vv
2022/06/02 20:30:43 DEBUG : rclone: Version "v1.58.1" starting with parameters ["rclone" "mount" "ggdrive:/" "/data" "--vfs-cache-mode" "writes" "--daemon" "--allow-other" "--allow-root" "--allow-non-empty" "-vv"]
2022/06/02 20:30:43 DEBUG : Creating backend with remote "ggdrive:/"
2022/06/02 20:30:43 DEBUG : Using config file from "/config/rclone/rclone.conf"
2022/06/02 20:30:43 DEBUG : Google drive root '': 'root_folder_id = 0ACHObUqF4lliUk9PVA' - save this in the config to speed up startup
2022/06/02 20:30:43 DEBUG : fs cache: renaming cache item "ggdrive:/" to be canonical "ggdrive:"
2022/06/02 20:30:43 DEBUG : rclone: Version "v1.58.1" finishing with parameters ["/usr/local/bin/rclone" "mount" "ggdrive:/" "/data" "--vfs-cache-mode" "writes" "--daemon" "--allow-other" "--allow-root" "--allow-non-empty" "-vv"]

#check file in mount point.

/data # rclone ls /data			#list files in the mount point with Gdrive.
       24 hello.rar			#Found 1 file hello.rar.
/data # echo '' > food.txt			#create a file food.txt in rclone container.
/data # rclone ls Gdrive:			#file food.txt uploaded to Gdrive.
        1 food.txt
       24 hello.rar
/data # exit			#exit rclone container
root@Tower:~# ls /mnt/disk1/unraid   		#list file in the mount directory in host.
root@Tower:~#			#nothing found.

#why this happens ?

The rclone config contents with secrets removed.

[Gdrive]
type = drive
token = {"access_token":"ya29.......Puy7Q","token_type":"Bearer","refresh_token":"1//06Nq.......EDbI","expiry":"2022-06-02T21:12:18.52488738-07:00"}
client_id = 8700..........nt.com
client_secret = GO..............tAf
scope = drive
team_drive = 

Make sure your docker config is correct. It needs to look like this - note the shared parameter.

# perform mount inside Docker container, expose result to host
mkdir -p ~/data/mount
docker run --rm \
    --volume ~/.config/rclone:/config/rclone \
    --volume ~/data:/data:shared \
    --user $(id -u):$(id -g) \
    --volume /etc/passwd:/etc/passwd:ro --volume /etc/group:/etc/group:ro \
    --device /dev/fuse --cap-add SYS_ADMIN --security-opt apparmor:unconfined \
    rclone/rclone \
    mount dropbox:Photos /data/mount &

Thank you for your reply @ncw
This is the config of rclone container

root@Tower:~# docker inspect 1e909e56f343
[
    {
        "Id": "1e909e56f343be...............................a8559f6347c119",
        "Created": "2022-06..........................08969Z",
        "Path": "rclone",
        "Args": [
            "rcd",
            "--rc-web-gui",
            "--rc-web-gui-update",
            "--rc-web-gui-force-update",
            "--rc-web-gui-no-open-browser",
            "--rc-addr",
            ":5572",
            "--rc-user",
            "rclone",
            "--rc-pass",
            "rclone"
        ],
        "State": {
            "Status": "running",
            "Running": true,
            "Paused": false,
            "Restarting": false,
            "OOMKilled": false,
            "Dead": false,
            "Pid": 12202,
            "ExitCode": 0,
            "Error": "",
            "StartedAt": "2022-06-.......................0002763Z",
            "FinishedAt": "2022-06-................................97Z"
        },
        "Image": "sha256:a690c06e387f1780f0207b848e82d8780d817e1ab5675cf8e1f4c05b48a05e1e",
        "ResolvConfPath": "/var/lib/docker/containers/1e909e56f343bedcd3034977ae2d4765b64ec81710b24eb501a8559f6347c119/resolv.conf",
        "HostnamePath": "/var/lib/docker/containers/1e909e56f343bedcd3034977ae2d4765b64ec81710b24eb501a8559f6347c119/hostname",
        "HostsPath": "/var/lib/docker/containers/1e909e56f343bedcd3034977ae2d4765b64ec81710b24eb501a8559f6347c119/hosts",
        "LogPath": "/var/lib/docker/containers/1e909e56f343bedcd3034977ae2d4765b64ec81710b24eb501a8559f6347c119/1e909e56f343bedcd3034977ae2d4765b64ec81710b24eb501a8559f6347c119-json.log",
        "Name": "/Nacho-Rclone-Native-GUI",
        "RestartCount": 0,
        "Driver": "btrfs",
        "Platform": "linux",
        "MountLabel": "",
        "ProcessLabel": "",
        "AppArmorProfile": "",
        "ExecIDs": [
            "e1b29.........................................................................................................d7cfb7",
            "d9e84........................................................................................................aa76",
            "5c6f23d........................................................................................................0fb482",
            "4ebe338........................................................................................................b27e3d",
            "05470........................................................................................................6a5fd",
            "f3351........................................................................................................6fac"
        ],
        "HostConfig": {
            "Binds": [
                "/mnt/disk1/unraid:/data:rw",
                "/mnt/user/appdata/rclone:/config/rclone:rw"
            ],
            "ContainerIDFile": "",
            "LogConfig": {
                "Type": "json-file",
                "Config": {}
            },
            "NetworkMode": "bridge",
            "PortBindings": {
                "5572/tcp": [
                    {
                        "HostIp": "",
                        "HostPort": "5572"
                    }
                ]
            },
            "RestartPolicy": {
                "Name": "no",
                "MaximumRetryCount": 0
            },
            "AutoRemove": false,
            "VolumeDriver": "",
            "VolumesFrom": null,
            "CapAdd": null,
            "CapDrop": null,
            "CgroupnsMode": "host",
            "Dns": [],
            "DnsOptions": [],
            "DnsSearch": [],
            "ExtraHosts": null,
            "GroupAdd": null,
            "IpcMode": "private",
            "Cgroup": "",
            "Links": null,
            "OomScoreAdj": 0,
            "PidMode": "",
            "Privileged": true,
            "PublishAllPorts": false,
            "ReadonlyRootfs": false,
            "SecurityOpt": [
                "label=disable"
            ],
            "UTSMode": "",
            "UsernsMode": "",
            "ShmSize": 67108864,
            "Runtime": "runc",
            "ConsoleSize": [
                0,
                0
            ],
            "Isolation": "",
            "CpuShares": 0,
            "Memory": 0,
            "NanoCpus": 0,
            "CgroupParent": "",
            "BlkioWeight": 0,
            "BlkioWeightDevice": [],
            "BlkioDeviceReadBps": null,
            "BlkioDeviceWriteBps": null,
            "BlkioDeviceReadIOps": null,
            "BlkioDeviceWriteIOps": null,
            "CpuPeriod": 0,
            "CpuQuota": 0,
            "CpuRealtimePeriod": 0,
            "CpuRealtimeRuntime": 0,
            "CpusetCpus": "",
            "CpusetMems": "",
            "Devices": [],
            "DeviceCgroupRules": null,
            "DeviceRequests": null,
            "KernelMemory": 0,
            "KernelMemoryTCP": 0,
            "MemoryReservation": 0,
            "MemorySwap": 0,
            "MemorySwappiness": null,
            "OomKillDisable": false,
            "PidsLimit": null,
            "Ulimits": null,
            "CpuCount": 0,
            "CpuPercent": 0,
            "IOMaximumIOps": 0,
            "IOMaximumBandwidth": 0,
            "MaskedPaths": null,
            "ReadonlyPaths": null
        },
        "GraphDriver": {
            "Data": null,
            "Name": "btrfs"
        },
        "Mounts": [
            {
                "Type": "bind",
                "Source": "/mnt/user/appdata/rclone",
                "Destination": "/config/rclone",
                "Mode": "rw",
                "RW": true,
                "Propagation": "rprivate"
            },
            {
                "Type": "bind",
                "Source": "/mnt/disk1/unraid",
                "Destination": "/data",
                "Mode": "rw",
                "RW": true,
                "Propagation": "rprivate"
            }
        ],
        "Config": {
            "Hostname": "1e909e56f343",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "ExposedPorts": {
                "5572/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "HOST_OS=Unraid",
                "HOST_HOSTNAME=Tower",
                "HOST_CONTAINERNAME=Nacho-Rclone-Native-GUI",
                "America/New_York=America/New_York",
                "PGID=100",
                "PUID=99",
                "TZ=America/Los_Angeles",
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "XDG_CONFIG_HOME=/config"
            ],
            "Cmd": [
                "rcd",
                "--rc-web-gui",
                "--rc-web-gui-update",
                "--rc-web-gui-force-update",
                "--rc-web-gui-no-open-browser",
                "--rc-addr",
                ":5572",
                "--rc-user",
                "rclone",
                "--rc-pass",
                "rclone"
            ],
            "Image": "rclone/rclone",
            "Volumes": null,
            "WorkingDir": "/data",
            "Entrypoint": [
                "rclone"
            ],
            "OnBuild": null,
            "Labels": {
                "net.unraid.docker.icon": "https://raw.githubusercontent.com/rclone/rclone/master/graphics/logo/logo_symbol/logo_symbol_color_256px.png",
                "net.unraid.docker.managed": "dockerman",
                "net.unraid.docker.webui": "http://[IP]:[PORT:5572]/"
            }
        },
        "NetworkSettings": {
            "Bridge": "",
            "SandboxID": "57........................................................................................................af10",
            "HairpinMode": false,
            "LinkLocalIPv6Address": "",
            "LinkLocalIPv6PrefixLen": 0,
            "Ports": {
                "5572/tcp": [
                    {
                        "HostIp": "0.0.0.0",
                        "HostPort": "5572"
                    },
                    {
                        "HostIp": "::",
                        "HostPort": "5572"
                    }
                ]
            },
            "SandboxKey": "/var/run/docker/netns/576743bfac91",
            "SecondaryIPAddresses": null,
            "SecondaryIPv6Addresses": null,
            "EndpointID": "7e482........................................................................................................e08c8",
            "Gateway": "17................",
            "GlobalIPv6Address": "",
            "GlobalIPv6PrefixLen": 0,
            "IPAddress": "1.................2",
            "IPPrefixLen": 16,
            "IPv6Gateway": "",
            "MacAddress": "0.......................02",
            "Networks": {
                "bridge": {
                    "IPAMConfig": null,
                    "Links": null,
                    "Aliases": null,
                    "NetworkID": "2c87........................................................................................................32",
                    "EndpointID": "7e........................................................................................................08c8",
                    "Gateway": "17..............1",
                    "IPAddress": "17.............2",
                    "IPPrefixLen": 16,
                    "IPv6Gateway": "",
                    "GlobalIPv6Address": "",
                    "GlobalIPv6PrefixLen": 0,
                    "MacAddress": "02:..................02",
                    "DriverOpts": null
                }
            }
        }
    }
]
root@Tower:~# 

This is the bit that needs the share in it I think. I'm not familiar with that config format though.