Rclone mount breaks Samba write access; File permission issues when layering Samba over rclone-mounted Google Drive

What is the problem you are having with rclone?

I am using rclone to mount Google Drive and layer Samba on top to make the Google Drive share accessible as an SMB network drive on my local network. However, I am encountering file permission errors when I try to run both Samba and rclone together.

  • Issue:
    • Samba works fine by itself.
    • rclone works fine by itself.
    • When I run both, after rclone is mounted, Samba becomes unwritable.
    • Previously, Samba allowed writes, but after running the rclone command, the Samba share becomes locked.

I have configured the fuse with user_allow_other and checked permissions on /srv/samba/scans. However, the issue persists.

Additionally, rclone works fine the first time it’s started. However, when I stop rclone and try to run it again, I get the following error:

~$ rclone mount GoogleDrive: /srv/samba/scans --allow-non-empty --allow-other -vv
2025/04/07 16:47:27 DEBUG : rclone: Version "v1.69.1" starting with parameters ["rclone" "mount" "GoogleDrive:" "/srv/samba/scans" "--allow-non-empty" "--allow-other"]
2025/04/07 16:47:27 DEBUG : Creating backend with remote "GoogleDrive:"
2025/04/07 16:47:27 DEBUG : Using config file from "/home/admin/.config/rclone/rclone.conf"
2025/04/07 16:47:27 DEBUG : Google drive root '': Mounting on "/srv/samba/scans"
2025/04/07 16:47:27 mount helper error: fusermount3: failed to access mountpoint /srv/samba/scans: Transport endpoint is not connected
2025/04/07 16:47:27 CRITICAL: Fatal error: failed to mount FUSE fs: fusermount: exit status 1

This error only occurs after rclone is stopped and then restarted.


samba config:
[scans]
	create mask = 0777
	guest ok = Yes
	hide files = /*/
	path = /srv/samba/scans
	read only = No
fuse config:
user_allow_other
Permissions on /srv/samba/scans:
ls -ld /srv/samba/scans
drwxrwxr-x 1 admin admin 0 Apr 7 16:35 **/srv/samba/scans**

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

rclone v1.69.1
- os/version: ubuntu 24.04 (64 bit)
- os/kernel: 6.8.0-1020-raspi (aarch64)
- os/type: linux
- os/arch: arm64 (ARMv8 compatible)
- go/version: go1.24.0
- go/linking: static
- go/tags: none

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

Google Drive

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

rclone mount GoogleDrive: /srv/samba/scans --allow-non-empty --allow-other

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

[GoogleDrive]
type = drive
client_id = XXX
client_secret = XXX
scope = drive
token = XXX
team_drive = XXX
root_folder_id = XXX

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

2025/04/07 16:58:10 DEBUG : rclone: Version "v1.69.1" starting with parameters ["rclone" "mount" "GoogleDrive:" "/srv/samba/scans" "--allow-non-empty" "--allow-other" "-vv"]
2025/04/07 16:58:10 DEBUG : Creating backend with remote "GoogleDrive:"
2025/04/07 16:58:10 DEBUG : Using config file from "/home/admin/.config/rclone/rclone.conf"
2025/04/07 16:58:10 DEBUG : Google drive root '': Mounting on "/srv/samba/scans"
2025/04/07 16:58:10 DEBUG : : Root: 
2025/04/07 16:58:10 DEBUG : : >Root: node=/, err=<nil>
2025/04/07 16:58:34 DEBUG : /: Attr: 
2025/04/07 16:58:34 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2025/04/07 16:58:34 DEBUG : /: Lookup: name="untitled folder"
2025/04/07 16:58:34 DEBUG : /: >Lookup: node=<nil>, err=no such file or directory
2025/04/07 16:58:34 DEBUG : /: ReadDirAll: 
2025/04/07 16:58:34 DEBUG : /: >ReadDirAll: item=5, err=<nil>
2025/04/07 16:58:34 DEBUG : /: Lookup: name="Untitled folder"
2025/04/07 16:58:34 DEBUG : /: >Lookup: node=Untitled folder/, err=<nil>
2025/04/07 16:58:34 DEBUG : Untitled folder/: Attr: 
2025/04/07 16:58:34 DEBUG : Untitled folder/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2025/04/07 16:58:34 DEBUG : /: Attr: 
2025/04/07 16:58:34 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2025/04/07 16:58:34 DEBUG : /: Lookup: name="untitled folder 2"
2025/04/07 16:58:34 DEBUG : /: >Lookup: node=<nil>, err=no such file or directory
2025/04/07 16:58:34 DEBUG : /: ReadDirAll: 
2025/04/07 16:58:34 DEBUG : /: >ReadDirAll: item=5, err=<nil>
2025/04/07 16:58:34 DEBUG : /: Attr: 
2025/04/07 16:58:34 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2025/04/07 16:58:34 DEBUG : /: Lookup: name="untitled folder 2"
2025/04/07 16:58:34 DEBUG : /: >Lookup: node=<nil>, err=no such file or directory
2025/04/07 16:58:34 DEBUG : /: ReadDirAll: 
2025/04/07 16:58:34 DEBUG : /: >ReadDirAll: item=5, err=<nil>
2025/04/07 16:58:34 DEBUG : /: Attr: 
2025/04/07 16:58:34 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2025/04/07 16:58:56 DEBUG : /: Attr: 
2025/04/07 16:58:56 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2025/04/07 16:58:56 DEBUG : /: Lookup: name="._\uf029"
2025/04/07 16:58:56 DEBUG : /: >Lookup: node=<nil>, err=no such file or directory
2025/04/07 16:58:56 DEBUG : /: ReadDirAll: 
2025/04/07 16:58:56 DEBUG : /: >ReadDirAll: item=5, err=<nil>
2025/04/07 16:58:57 DEBUG : /: Attr: 
2025/04/07 16:58:57 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2025/04/07 16:58:57 DEBUG : : Statfs: 
2025/04/07 16:58:57 DEBUG : Google drive root '': read info from Shared Drive "Files-RedactedName"
2025/04/07 16:58:57 DEBUG : : >Statfs: stat={Blocks:274877906943 Bfree:274877906944 Bavail:274877906943 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=<nil>
2025/04/07 16:58:57 DEBUG : /: Lookup: name="GoogleDrive:"
2025/04/07 16:58:57 DEBUG : /: >Lookup: node=<nil>, err=no such file or directory
2025/04/07 16:58:57 DEBUG : /: Lookup: name="GoogleDrive:"
2025/04/07 16:58:57 DEBUG : /: >Lookup: node=<nil>, err=no such file or directory
^C2025/04/07 16:59:04 INFO  : Signal received: interrupt
2025/04/07 16:59:04 ERROR : /srv/samba/scans: Failed to unmount: exit status 1: fusermount3: failed to unmount /srv/samba/scans: Device or resource busy
2025/04/07 16:59:04 INFO  : Exiting...

welcome to the forum,

unless you are 1000% sure you need that flag, should remove it.
make sure there is not another instance of rclone mount running in the background.

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