Help needed to connect to a Google Drive Shared folder

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 cannot connect to the “Shared with me” folders on my Google Drive account.

Connecting to my owned folders works fine: I used rclone config to create a handle to my Google Drive and I can easily mount it on my desktop. However, the “Shared with me” folders are empty. I then tried to create a second handle only for the “Shared with me” folders with rclone config, but the process fails: rclone config tells me there are no shared drives:

Configure this as a Shared Drive (Team Drive)?

y) Yes
n) No (default)
y/n> y

No Shared Drives found in your account
Configuration complete.
``` 

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

rclone v1.72.0

  • os/version: arch (64 bit)
  • os/kernel: 6.12.21-1-lts (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.25.4 X:nodwarf5
  • go/linking: dynamic
  • 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 config

rclone config 

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

[Gdrive-MM-shared]
type = drive
scope = drive
token = XXX

[gdrive]
type = drive
client_id = XXX
client_secret = XXX
scope = drive
token = XXX
team_drive = 
### Double check the config for sensitive info before posting publicly
```

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

Paste  log here

welcome to the forum,

might try --drive-shared-with-me

Ah! I thought I had to create a different config for the shared folders—that was my mistake!

I see now that I can simply mount them with the general remote and the command:

rclone mount  gdrive:/The-Shared-With-Me-Folder --drive-shared-with-me ~/The-Mount-Point``` 

Thanks!

``

yeah, it is a bit confusing, the differences between shared folders versus shared drives

I thought the issue was solved, but actually, it turns out my app (LyX) cannot write to the mounted drive—I only have read access from within the application. I do have both write and read access from the terminal, and the permissions show I am the owner of all the files and folders on the drive (which is a bit weird…but OK).

A googleAPI error shows up in the log:

2025/11/30 10:57:22 ERROR : IO error: googleapi: Error 403: The user does not have sufficient permissions for this file., insufficientFilePermissions

``` 

Is there something else I need to include in rclone’s config to grant a specific application write access?

post the top 30 lines of the debug log.


well, if the file is shared with you, then you are not the owner, might not have full permission.
does that make sense?


not sure what that means?

Well, I know I am not supposed to be the owner of the shared folder and and all of its files, but if I just list them from a shell after the shared drive is mounted, I (Stefano) am listed as the owner:

stefano@gorgias ~ $ ls -l Documents/Manu/Merchants-of-Enchantments-from-Google-Drive/
total 1.5M
drwxr-xr-x 1 stefano wheel    0 Apr 25  2019  00-Frontmatter
drwxr-xr-x 1 stefano wheel    0 Nov 30 07:01  0-Introduction
drwxr-xr-x 1 stefano wheel    0 Nov 26 09:43  1-Manzoni-Rhetoric
drwxr-xr-x 1 stefano wheel    0 Nov 26 14:08  2-Contini-Longhi-Gadda
drwxr-xr-x 1 stefano wheel    0 Nov 27 11:16 '3-Gadda-Dante Longhi'
drwxr-xr-x 1 stefano wheel    0 Nov 25 15:16 '4-Godard Pasolini'
drwxr-xr-x 1 stefano wheel    0 Nov 23 11:57  5-Moresco
drwxr-xr-x 1 stefano wheel    0 Aug 18 16:47  7-Conclusion
-rw-r--r-- 1 stefano wheel 0 Nov 30 16:06 Merchants-of-Enchantment-FINAL.lyx

```  

If I access the folder from Google Drive web interface, I am correctly listed as an “Editor” (hence with write permissions) and NOT as “Owner.”

As for the requested log: I could not find it anywhere—where is the default location? Lacking that, I append the debug output to terminal when I tried to save the file from within LyX. When saving, Lyx:

  1. moves the current file to a backup by renaming the current file to the same filename with an appended tilde (there is always such a file after the first save, so this operation is in fact a destructive rewrite operation)
  2. Saves the memory content (the content of the current buffer) to a new file with the current filename

Both operations fail, with the result that the backup is not created, and the new file has length 0 (i.e. nothing is saved to it). Pretty grim.

Here is the relevant part of the debug output, briefly shortened. I don’t understand why the file I am trying to save, whose filename is “Merchants-of-Enchantment-FINAL.lyx” is opened with “flags=0_RDONLY” but perhaps that is just a preliminary reading.

Let me know if there is a better way to get diagnostic info:

2025/11/30 16:06:06 DEBUG : /: Attr: 
2025/11/30 16:06:06 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2025/11/30 16:06:11 DEBUG : /: Attr: 
2025/11/30 16:06:11 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2025/11/30 16:06:12 DEBUG : /: Lookup: name="Merchants-of-Enchantment-FINAL.lyx"
2025/11/30 16:06:12 DEBUG : /: >Lookup: node=Merchants-of-Enchantment-FINAL.lyx, err=<nil>
2025/11/30 16:06:12 DEBUG : Merchants-of-Enchantment-FINAL.lyx: Attr: 
2025/11/30 16:06:12 DEBUG : Merchants-of-Enchantment-FINAL.lyx: >Attr: a=valid=1s ino=0 size=8109 mode=-rw-r--r--, err=<nil>
2025/11/30 16:06:12 DEBUG : Merchants-of-Enchantment-FINAL.lyx: Open: flags=OpenReadOnly
2025/11/30 16:06:12 DEBUG : Merchants-of-Enchantment-FINAL.lyx: Open: flags=O_RDONLY
2025/11/30 16:06:12 DEBUG : Merchants-of-Enchantment-FINAL.lyx: >Open: fd=Merchants-of-Enchantment-FINAL.lyx (r), err=<nil>
2025/11/30 16:06:12 DEBUG : Merchants-of-Enchantment-FINAL.lyx: >Open: fh=&{Merchants-of-Enchantment-FINAL.lyx (r)}, err=<nil>
2025/11/30 16:06:12 DEBUG : &{Handle:Merchants-of-Enchantment-FINAL.lyx (r)}: Read: len=8192, offset=0
2025/11/30 16:06:12 DEBUG : Merchants-of-Enchantment-FINAL.lyx: ChunkedReader.openRange at 0 length 134217728
2025/11/30 16:06:13 DEBUG : Merchants-of-Enchantment-FINAL.lyx: ChunkedReader.Read at 0 length 8192 chunkOffset 0 chunkSize 134217
728
2025/11/30 16:06:13 DEBUG : &{Handle:Merchants-of-Enchantment-FINAL.lyx (r)}: >Read: read=8109, err=<nil>
2025/11/30 16:06:13 DEBUG : &{Handle:Merchants-of-Enchantment-FINAL.lyx (r)}: Flush: 
2025/11/30 16:06:13 DEBUG : &{Handle:Merchants-of-Enchantment-FINAL.lyx (r)}: >Flush: err=<nil>
2025/11/30 16:06:13 DEBUG : &{Handle:Merchants-of-Enchantment-FINAL.lyx (r)}: Release: 
2025/11/30 16:06:13 DEBUG : Merchants-of-Enchantment-FINAL.lyx: ReadFileHandle.Release closing
2025/11/30 16:06:13 DEBUG : &{Handle:Merchants-of-Enchantment-FINAL.lyx (r)}: >Release: err=<nil>
2025/11/30 16:06:13 DEBUG : /: Lookup: name="Merchants-of-Enchantment-FINAL-pGCFfa.lyx"
2025/11/30 16:06:13 DEBUG : /: >Lookup: node=<nil>, err=no such file or directory
2025/11/30 16:06:13 DEBUG : /: Create: name="Merchants-of-Enchantment-FINAL-pGCFfa.lyx"
2025/11/30 16:06:13 DEBUG : Merchants-of-Enchantment-FINAL-pGCFfa.lyx: Open: flags=O_RDWR|O_CREATE|O_EXCL
2025/11/30 16:06:13 DEBUG : Added virtual directory entry vAddFile: "Merchants-of-Enchantment-FINAL-pGCFfa.lyx"
2025/11/30 16:06:13 DEBUG : Merchants-of-Enchantment-FINAL-pGCFfa.lyx: >Open: fd=Merchants-of-Enchantment-FINAL-pGCFfa.lyx (w), er
r=<nil>
2025/11/30 16:06:13 DEBUG : /: >Create: node=Merchants-of-Enchantment-FINAL-pGCFfa.lyx, handle=&{Merchants-of-Enchantment-FINAL-pG
CFfa.lyx (w)}, err=<nil>
2025/11/30 16:06:13 DEBUG : Merchants-of-Enchantment-FINAL-pGCFfa.lyx: Attr: 
2025/11/30 16:06:13 DEBUG : Merchants-of-Enchantment-FINAL-pGCFfa.lyx: >Attr: a=valid=1s ino=0 size=0 mode=-rw-r--r--, err=<nil>
2025/11/30 16:06:13 DEBUG : Merchants-of-Enchantment-FINAL.lyx: Attr: 
2025/11/30 16:06:13 DEBUG : Merchants-of-Enchantment-FINAL.lyx: >Attr: a=valid=1s ino=0 size=8109 mode=-rw-r--r--, err=<nil>
2025/11/30 16:06:13 DEBUG : Merchants-of-Enchantment-FINAL-pGCFfa.lyx: Setattr: a=Setattr [ID=0x48bc Node=0x91 Uid=1001 Gid=10 Pid
=289675] mode=-rwxr--r-- handle=INVALID-0x0
2025/11/30 16:06:13 DEBUG : Merchants-of-Enchantment-FINAL-pGCFfa.lyx: >Setattr: err=<nil>
2025/11/30 16:06:13 DEBUG : Merchants-of-Enchantment-FINAL-pGCFfa.lyx: Attr: 
2025/11/30 16:06:13 DEBUG : Merchants-of-Enchantment-FINAL-pGCFfa.lyx: >Attr: a=valid=1s ino=0 size=0 mode=-rw-r--r--, err=<nil>
2025/11/30 16:06:13 DEBUG : Merchants-of-Enchantment-FINAL-pGCFfa.lyx: Open: flags=OpenWriteOnly
2025/11/30 16:06:13 DEBUG : Merchants-of-Enchantment-FINAL-pGCFfa.lyx: Open: flags=O_WRONLY
2025/11/30 16:06:13 DEBUG : Merchants-of-Enchantment-FINAL-pGCFfa.lyx: >Open: fd=Merchants-of-Enchantment-FINAL-pGCFfa.lyx (w), er
r=<nil>
2025/11/30 16:06:13 DEBUG : Merchants-of-Enchantment-FINAL-pGCFfa.lyx: >Open: fh=&{Merchants-of-Enchantment-FINAL-pGCFfa.lyx (w)},
 err=<nil>
2025/11/30 16:06:13 DEBUG : Merchants-of-Enchantment-FINAL-pGCFfa.lyx: Setattr: a=Setattr [ID=0x48c0 Node=0x91 Uid=1001 Gid=10 Pid
=289675] size=0 handle=INVALID-0x0 lockowner
2025/11/30 16:06:13 DEBUG : Merchants-of-Enchantment-FINAL-pGCFfa.lyx: Truncating 2 file handles
2025/11/30 16:06:13 DEBUG : Merchants-of-Enchantment-FINAL-pGCFfa.lyx: >Setattr: err=<nil>
2025/11/30 16:06:13 DEBUG : Merchants-of-Enchantment-FINAL-pGCFfa.lyx: Attr: 
2025/11/30 16:06:13 DEBUG : Merchants-of-Enchantment-FINAL-pGCFfa.lyx: >Attr: a=valid=1s ino=0 size=0 mode=-rw-r--r--, err=<nil>
2025/11/30 16:06:13 DEBUG : &{Handle:Merchants-of-Enchantment-FINAL-pGCFfa.lyx (w)}: Write: len=4917, offset=0
2025/11/30 16:06:13 DEBUG : Added virtual directory entry vAddFile: "Merchants-of-Enchantment-FINAL-pGCFfa.lyx"
2025/11/30 16:06:13 DEBUG : &{Handle:Merchants-of-Enchantment-FINAL-pGCFfa.lyx (w)}: >Write: written=4917, err=<nil>

[I AM TRIMMING A LONG LIST OF LINES IDENTICAL TO THE ABOVE BUT WITH DIFFERENT OFFSETS, ENDING WITH:]

2025/11/30 16:06:13 DEBUG : Google drive root 'Merchants-of-Enchantments-CURRENT': File to upload is small (8110 bytes), uploading instead of streaming


afiak, google permission has nothing to do with linux mount permissions.


there is no default location.
--log-level=DEBUG --log-file=~/rclone.log


in general, to write/edit files on a rclone mount, need to use --vfs-cache-mode=writes|full
the debug log would show that...

I tried remounting the drive with --vfs-cache-mode=full, no change, same error

Ah, good to know. So here is the (long) snippet from the log that seems relevant, starting from when I tried to save the file:

2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL.lyx: Attr: 
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL.lyx: >Attr: a=valid=1s ino=0 size=8109 mode=-rw-r--r--, err=<nil>
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL.lyx: Open: flags=OpenReadOnly
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL.lyx: Open: flags=O_RDONLY
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL.lyx: newRWFileHandle: 
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL.lyx: >newRWFileHandle: err=<nil>
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL.lyx: >Open: fd=Merchants-of-Enchantment-FINAL.lyx (rw), err=<nil>
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL.lyx: >Open: fh=&{Merchants-of-Enchantment-FINAL.lyx (rw)}, err=<nil>
2025/11/30 17:10:35 DEBUG : &{Handle:Merchants-of-Enchantment-FINAL.lyx (rw)}: Read: len=8192, offset=0
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL.lyx(0xc000f12480): _readAt: size=8192, off=0
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL.lyx(0xc000f12480): openPending: 
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL.lyx: vfs cache: checking remote fingerprint "8109,2025-11-30 17:27:42.998 +0000 UTC,8dc38a9b7d345c24e6d22c60dba35c86" against cached fingerprint "8109,2025-11-30 17:27:42.998 +0000 UTC,8dc38a9b7d345c24e6d22c60dba35c86"
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL.lyx: vfs cache: truncate to size=8109 (not needed as size correct)
2025/11/30 17:10:35 DEBUG : Added virtual directory entry vAddFile: "Merchants-of-Enchantment-FINAL.lyx"
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL.lyx(0xc000f12480): >openPending: err=<nil>
2025/11/30 17:10:35 DEBUG : vfs cache: looking for range={Pos:0 Size:8109} in [{Pos:0 Size:8109}] - present true
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL.lyx(0xc000f12480): >_readAt: n=8109, err=EOF
2025/11/30 17:10:35 DEBUG : &{Handle:Merchants-of-Enchantment-FINAL.lyx (rw)}: >Read: read=8109, err=<nil>
2025/11/30 17:10:35 DEBUG : &{Handle:Merchants-of-Enchantment-FINAL.lyx (rw)}: Flush: 
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL.lyx(0xc000f12480): RWFileHandle.Flush
2025/11/30 17:10:35 DEBUG : &{Handle:Merchants-of-Enchantment-FINAL.lyx (rw)}: >Flush: err=<nil>
2025/11/30 17:10:35 DEBUG : &{Handle:Merchants-of-Enchantment-FINAL.lyx (rw)}: Release: 
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL.lyx(0xc000f12480): RWFileHandle.Release
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL.lyx(0xc000f12480): close: 
2025/11/30 17:10:35 DEBUG : /: Lookup: name="Merchants-of-Enchantment-FINAL-ueUuve.lyx"
2025/11/30 17:10:35 DEBUG : /: >Lookup: node=<nil>, err=no such file or directory
2025/11/30 17:10:35 DEBUG : /: Create: name="Merchants-of-Enchantment-FINAL-ueUuve.lyx"
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL.lyx: vfs cache: setting modification time to 2025-11-30 17:27:42.998 +0000 UTC
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL-ueUuve.lyx: Open: flags=O_RDWR|O_CREATE|O_EXCL
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL.lyx(0xc000f12480): >close: err=<nil>
2025/11/30 17:10:35 DEBUG : &{Handle:Merchants-of-Enchantment-FINAL.lyx (rw)}: >Release: err=<nil>
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL-ueUuve.lyx: newRWFileHandle: 
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL-ueUuve.lyx(0xc000c5a500): openPending: 
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL-ueUuve.lyx: vfs cache: truncate to size=0 (not needed as size correct)
2025/11/30 17:10:35 DEBUG : Added virtual directory entry vAddFile: "Merchants-of-Enchantment-FINAL-ueUuve.lyx"
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL-ueUuve.lyx(0xc000c5a500): >openPending: err=<nil>
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL-ueUuve.lyx: >newRWFileHandle: err=<nil>
2025/11/30 17:10:35 DEBUG : Added virtual directory entry vAddFile: "Merchants-of-Enchantment-FINAL-ueUuve.lyx"
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL-ueUuve.lyx: >Open: fd=Merchants-of-Enchantment-FINAL-ueUuve.lyx (rw), err=<nil>
2025/11/30 17:10:35 DEBUG : /: >Create: node=Merchants-of-Enchantment-FINAL-ueUuve.lyx, handle=&{Merchants-of-Enchantment-FINAL-ueUuve.lyx (rw)}, err=<nil>
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL-ueUuve.lyx: Attr: 
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL-ueUuve.lyx: >Attr: a=valid=1s ino=0 size=0 mode=-rw-r--r--, err=<nil>
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL.lyx: Attr: 
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL.lyx: >Attr: a=valid=1s ino=0 size=8109 mode=-rw-r--r--, err=<nil>
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL-ueUuve.lyx: Setattr: a=Setattr [ID=0x2302 Node=0x6 Uid=1001 Gid=10 Pid=296308] mode=-rwxr--r-- handle=INVALID-0x0
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL-ueUuve.lyx: >Setattr: err=<nil>
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL-ueUuve.lyx: Attr: 
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL-ueUuve.lyx: >Attr: a=valid=1s ino=0 size=0 mode=-rw-r--r--, err=<nil>
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL-ueUuve.lyx: Open: flags=OpenWriteOnly
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL-ueUuve.lyx: Open: flags=O_WRONLY
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL-ueUuve.lyx: newRWFileHandle: 
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL-ueUuve.lyx: >newRWFileHandle: err=<nil>
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL-ueUuve.lyx: >Open: fd=Merchants-of-Enchantment-FINAL-ueUuve.lyx (rw), err=<nil>
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL-ueUuve.lyx: >Open: fh=&{Merchants-of-Enchantment-FINAL-ueUuve.lyx (rw)}, err=<nil>
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL-ueUuve.lyx: Setattr: a=Setattr [ID=0x2306 Node=0x6 Uid=1001 Gid=10 Pid=296308] size=0 handle=INVALID-0x0 lockowner
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL-ueUuve.lyx: Truncating 2 file handles
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL-ueUuve.lyx(0xc000c5ab80): openPending: 
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL-ueUuve.lyx: vfs cache: truncate to size=0 (not needed as size correct)
2025/11/30 17:10:35 DEBUG : Added virtual directory entry vAddFile: "Merchants-of-Enchantment-FINAL-ueUuve.lyx"
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL-ueUuve.lyx(0xc000c5ab80): >openPending: err=<nil>
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL-ueUuve.lyx: >Setattr: err=<nil>
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL-ueUuve.lyx: Attr: 
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL-ueUuve.lyx: >Attr: a=valid=1s ino=0 size=0 mode=-rw-r--r--, err=<nil>
2025/11/30 17:10:35 DEBUG : &{Handle:Merchants-of-Enchantment-FINAL-ueUuve.lyx (rw)}: Write: len=4917, offset=0
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL-ueUuve.lyx(0xc000c5ab80): _writeAt: size=4917, off=0
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL-ueUuve.lyx(0xc000c5ab80): >_writeAt: n=4917, err=<nil>


a long list of almost identical write operations follow, then comes the sequence that leads to the permission error:


2025/11/30 17:10:35 DEBUG : &{Handle:Merchants-of-Enchantment-FINAL-ueUuve.lyx (rw)}: Flush: 
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL-ueUuve.lyx(0xc000c5ab80): RWFileHandle.Flush
2025/11/30 17:10:35 DEBUG : &{Handle:Merchants-of-Enchantment-FINAL-ueUuve.lyx (rw)}: >Flush: err=<nil>
2025/11/30 17:10:35 DEBUG : &{Handle:Merchants-of-Enchantment-FINAL-ueUuve.lyx (rw)}: Release: 
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL-ueUuve.lyx(0xc000c5ab80): RWFileHandle.Release
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL-ueUuve.lyx(0xc000c5ab80): close: 
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL-ueUuve.lyx(0xc000c5ab80): >close: err=<nil>
2025/11/30 17:10:35 DEBUG : &{Handle:Merchants-of-Enchantment-FINAL-ueUuve.lyx (rw)}: >Release: err=<nil>
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL.lyx: Open: flags=OpenReadOnly
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL.lyx: Open: flags=O_RDONLY
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL.lyx: newRWFileHandle: 
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL.lyx: >newRWFileHandle: err=<nil>
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL.lyx: >Open: fd=Merchants-of-Enchantment-FINAL.lyx (rw), err=<nil>
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL.lyx: >Open: fh=&{Merchants-of-Enchantment-FINAL.lyx (rw)}, err=<nil>
2025/11/30 17:10:35 DEBUG : &{Handle:Merchants-of-Enchantment-FINAL.lyx (rw)}: Read: len=8192, offset=0
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL.lyx(0xc000f12ac0): _readAt: size=8192, off=0
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL.lyx(0xc000f12ac0): openPending: 
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL.lyx: vfs cache: checking remote fingerprint "8109,2025-11-30 17:27:42.998 +0000 UTC,8dc38a9b7d345c24e6d22c60dba35c86" against cached fingerprint "8109,2025-11-30 17:27:42.998 +0000 UTC,8dc38a9b7d345c24e6d22c60dba35c86"
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL.lyx: vfs cache: truncate to size=8109 (not needed as size correct)
2025/11/30 17:10:35 DEBUG : Added virtual directory entry vAddFile: "Merchants-of-Enchantment-FINAL.lyx"
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL.lyx(0xc000f12ac0): >openPending: err=<nil>
2025/11/30 17:10:35 DEBUG : vfs cache: looking for range={Pos:0 Size:8109} in [{Pos:0 Size:8109}] - present true
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL.lyx(0xc000f12ac0): >_readAt: n=8109, err=EOF
2025/11/30 17:10:35 DEBUG : &{Handle:Merchants-of-Enchantment-FINAL.lyx (rw)}: >Read: read=8109, err=<nil>
2025/11/30 17:10:35 DEBUG : &{Handle:Merchants-of-Enchantment-FINAL.lyx (rw)}: Flush: 
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL.lyx(0xc000f12ac0): RWFileHandle.Flush
2025/11/30 17:10:35 DEBUG : &{Handle:Merchants-of-Enchantment-FINAL.lyx (rw)}: >Flush: err=<nil>
2025/11/30 17:10:35 DEBUG : &{Handle:Merchants-of-Enchantment-FINAL.lyx (rw)}: Release: 
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL.lyx(0xc000f12ac0): RWFileHandle.Release
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL.lyx(0xc000f12ac0): close: 
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL.lyx: vfs cache: setting modification time to 2025-11-30 17:27:42.998 +0000 UTC
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL.lyx(0xc000f12ac0): >close: err=<nil>
2025/11/30 17:10:35 DEBUG : &{Handle:Merchants-of-Enchantment-FINAL.lyx (rw)}: >Release: err=<nil>
2025/11/30 17:10:35 DEBUG : /: Lookup: name="Merchants-of-Enchantment-FINAL.lyx~"
2025/11/30 17:10:35 DEBUG : /: >Lookup: node=Merchants-of-Enchantment-FINAL.lyx~, err=<nil>
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL.lyx~: Attr: 
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL.lyx~: >Attr: a=valid=1s ino=0 size=7286 mode=-rw-r--r--, err=<nil>
2025/11/30 17:10:35 DEBUG : /: Remove: name="Merchants-of-Enchantment-FINAL.lyx~"
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL.lyx~: Remove: 
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL.lyx~: File.Remove file error: googleapi: Error 403: The user does not have sufficient permissions for this file., insufficientFilePermissions
2025/11/30 17:10:35 DEBUG : Merchants-of-Enchantment-FINAL.lyx~: >Remove: err=googleapi: Error 403: The user does not have sufficient permissions for this file., insufficientFilePermissions
2025/11/30 17:10:35 ERROR : IO error: googleapi: Error 403: The user does not have sufficient permissions for this file., insufficientFilePermissions
2025/11/30 17:10:35 DEBUG : /: >Remove: err=googleapi: Error 403: The user does not have sufficient permissions for this file., insufficientFilePermissions

And finally, here is the beginning of the log, showing the successful mount and its parameters:

2025/11/30 17:08:53 DEBUG : rclone: Version "v1.72.0" starting with parameters ["rclone" "mount" "--log-level=DEBUG" "--log-file=/home/stefano/temp/rclone.log" "--vfs-cache-mode=full" "gdrive:/Merchants-of-Enchantments-CURRENT" "--drive-shared-with-me" "/home/stefano/Documents/Manu/Merchants-of-Enchantments-from-Google-Drive/"]
2025/11/30 17:08:53 DEBUG : Creating backend with remote "gdrive:/Merchants-of-Enchantments-CURRENT"
2025/11/30 17:08:53 DEBUG : Using config file from "/home/stefano/.config/rclone/rclone.conf"
2025/11/30 17:08:53 DEBUG : gdrive: detected overridden config - adding "{ysOIc}" suffix to name
2025/11/30 17:08:53 DEBUG : Google drive root 'Merchants-of-Enchantments-CURRENT': 'root_folder_id = 0ALayq_ddRnS-Uk9PVA' - save this in the config to speed up startup
2025/11/30 17:08:53 DEBUG : fs cache: renaming cache item "gdrive:/Merchants-of-Enchantments-CURRENT" to be canonical "gdrive{ysOIc}:Merchants-of-Enchantments-CURRENT"
2025/11/30 17:08:53 DEBUG : Google drive root 'Merchants-of-Enchantments-CURRENT': vfs cache: root is "/home/stefano/.cache/rclone"
2025/11/30 17:08:53 DEBUG : Google drive root 'Merchants-of-Enchantments-CURRENT': vfs cache: data root is "/home/stefano/.cache/rclone/vfs/gdrive{ysOIc}/Merchants-of-Enchantments-CURRENT"
2025/11/30 17:08:53 DEBUG : Google drive root 'Merchants-of-Enchantments-CURRENT': vfs cache: metadata root is "/home/stefano/.cache/rclone/vfsMeta/gdrive{ysOIc}/Merchants-of-Enchantments-CURRENT"
2025/11/30 17:08:53 DEBUG : Creating backend with remote ":local,encoding='Slash,Dot',links=false:/home/stefano/.cache/rclone/vfs/gdrive{ysOIc}/Merchants-of-Enchantments-CURRENT"
2025/11/30 17:08:53 DEBUG : :local: detected overridden config - adding "{8un-i}" suffix to name
2025/11/30 17:08:53 DEBUG : fs cache: renaming cache item ":local,encoding='Slash,Dot',links=false:/home/stefano/.cache/rclone/vfs/gdrive{ysOIc}/Merchants-of-Enchantments-CURRENT" to be canonical ":local{8un-i}:/home/stefano/.cache/rclone/vfs/gdrive{ysOIc}/Merchants-of-Enchantments-CURRENT"
2025/11/30 17:08:53 DEBUG : Creating backend with remote ":local,encoding='Slash,Dot',links=false:/home/stefano/.cache/rclone/vfsMeta/gdrive{ysOIc}/Merchants-of-Enchantments-CURRENT"
2025/11/30 17:08:53 DEBUG : :local: detected overridden config - adding "{8un-i}" suffix to name
2025/11/30 17:08:53 DEBUG : fs cache: renaming cache item ":local,encoding='Slash,Dot',links=false:/home/stefano/.cache/rclone/vfsMeta/gdrive{ysOIc}/Merchants-of-Enchantments-CURRENT" to be canonical ":local{8un-i}:/home/stefano/.cache/rclone/vfsMeta/gdrive{ysOIc}/Merchants-of-Enchantments-CURRENT"
2025/11/30 17:08:53 INFO  : Google drive root 'Merchants-of-Enchantments-CURRENT': vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2025/11/30 17:08:53 DEBUG : Google drive root 'Merchants-of-Enchantments-CURRENT': Mounting on "/home/stefano/Documents/Manu/Merchants-of-Enchantments-from-Google-Drive/"
2025/11/30 17:08:53 DEBUG : Root: 

forget rclone mount. let's focus on simple commands first.

  1. copy one single file from local to the shared folder.
  2. rename a file in the shared folder.
  3. delete a file in the shared folder.

I have no issues copying to or writing to the mounted folder from the terminal, from the file browser (Dolphin), or even from other apps. It is only LyX that is giving me issues. In fact, it is the first of the two saving steps I listed above that gives problems: the creation of the backup file. If I alter LyX’s setting and avoid such a step, then everything works fine. Which is rather unsafe, unfortunately, for such a collaborative project.

post an example file name?

Not sure what you are asking, but LyX’s standard procedure when saving a file called, let’s say, book.lyx is:

  1. Delete book.lyx~ if present
  2. Move book.lyx to book.lyx~
  3. Save ram buffer to book.lyx

I think it is step 2 that fails, and that makes the step 3 that follows fail as well.

If I change LyX’s preferences to avoid saving backups, thereby skipping steps 1 and 2, the saving procedure (i.e. step 3) works fine. At least that’s what it seems to me the log reports.

perhaps it is step 1 that fails?

Merchants-of-Enchantment-FINAL.lyx~: File.Remove file error: googleapi: Error 403: 

afiak, this is expected behavior, that an Editor does not have permission to remove files

Well, I can remove files from the shell and from the file browser, so I don’t think that is the issue.

I just tested working with emacs, which uses the same procedure to create backup files (probably where LyX copied it from, in fact), and there is a similar issues, although dealt with more gracefully. Emacs tries to save, say, filename.txt to filename.txt~ but it silently fails if the file exists (i.e. after the second save). However, it still saves the memory buffer to filename.txt, and no data is lost (whereas LyX aborts the process midway, resulting in an empty file).

So it seems to me that Google somehow prevents the destructive renaming of an existing file, an action Linux is perfectly happy to execute, on the contrary. At least, it prevents an Editor from doing so.

At any rate, I just remembered that Google Drive keeps a few previous instances of its files, so removing the backup preference is not such a big deal, after all. I will stop worrying and proceed that way.

Thanks for the help, I certainly learn quite a few things today.

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