Jellyfin with rclone mount not finding directory contents

I'm new with Jellyfin, I'm setting up a server and I came across this problem, jellyfin doesn't find the contents inside the mounted directory, I use two google drive accounts defined in two folders 'drive1' and 'drive2' using the following command to assembly:
rclone mount gdrive2: /mnt/drive2 --allow-other --vfs-cache-mode full --vfs-cache-max-size 2G --buffer-size 256M --dir-cache-time 48h --poll-interval 1m --umask 002 --buffer-size 32M --vfs-read-chunk-size 128M --log-level DEBUG --log-file /var/log/drive2.log

CentOS Linux release 7.9.2009 (Core)

Log Jellyfin:

Log Rclone Mount:

If I'm missing any more information, please correct me.

Eu verificaria se consegue acessar os arquivos logado como o usuário que executa o Jellyfin.
Algo como:

su - jellyfin
ls /mnt/drive2
file '/mnt/drive2/#4K/Esquadrão Suicida: Acerto de Contas (2018).mkv'

I don't have access using the jellyfin user, the directory appears empty

Make sure the drive is mounted with option --allow-other

does these command work?
rclone ls gdrive1:
rclone ls gdrive2:

might test using simple command:
rclone mount gdrive2: /mnt/drive2 --allow-other

This is my setup for mounting the drive
Description=drive1 Service

ExecStart=/usr/bin/rclone mount gdrive: /mnt/drive1
--poll-interval 30s
--dir-cache-time 48h
--cache-workers 7
--umask 000
--acd-templink-threshold 0
--buffer-size 512M
--vfs-cache-mode full
--vfs-read-chunk-size 128M
--vfs-read-chunk-size-limit off
--cache-dir /cache/
--log-level INFO
--log-file /var/log/drive1.log
ExecStop=/bin/fusermount -u /mnt/drive1


rclone ls command shows all files

please post the redacted output for rclone config show

that systemd service file does not match the command you posted?
at this time, adding systemd just adds another layer of confusion.

so let's try to keep this simple, test on the command line using the simple command i shared.

these flags are for the cache remote, that has been deprecated, why use that?

--cache-workers 7 

is there a specific reason to use --acd-templink-threshold?

I would add these parameters:
--umask=002 --uid=XXXX --gid=YYYY --dir-perms=0770 --file-perms=0664
Replace XXXX and YYYY with jellyfin UID and GID respectively.

–acd-templink-threshold ,Carrying out research on mounting a drive with rclone, I saw that it would be interesting for reading large files, such as movies with 4k resolution. These two I saw in a montage for the Plex of a user here on the Forum
--cache-workers 7

The Command works, the permissions on the contents are ok and still Jellyfin does not start the scan. This one is near jellyfin.log

System.IO.FileNotFoundException: Can't find item path.
File name: '/mnt/drive2/#4K/Esquadr�o Suicida: Acerto de Contas (2018).mkv'
   at Emby.Server.Implementations.Library.ResolverHelper.SetInitialItemValues(BaseItem item, Folder parent, ILibraryManager libraryManager, IDirectoryService directoryService)
   at Emby.Server.Implementations.Library.LibraryManager.ResolvePaths(IEnumerable`1 files, IDirectoryService directoryService, Folder parent, LibraryOptions libraryOptions, String collectionType, IItemResolver[] resolvers)
   at Emby.Server.Implementations.Library.LibraryManager.ResolvePaths(IEnumerable`1 files, IDirectoryService directoryService, Folder parent, LibraryOptions libraryOptions, String collectionType)
   at MediaBrowser.Controller.Entities.Folder.GetNonCachedChildren(IDirectoryService directoryService)
   at MediaBrowser.Controller.Entities.Folder.ValidateChildrenInternal2(IProgress`1 progress, Boolean recursive, Boolean refreshChildMetadata, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService, CancellationToken cancellationToken)
[2023-04-13 08:51:57.371 -05:00] [ERR] Error running post-scan task
System.ArgumentException: Not enough valid pictures provided to create a splashscreen!
   at Jellyfin.Drawing.Skia.SplashscreenBuilder.GenerateCollage(IReadOnlyList`1 posters, IReadOnlyList`1 backdrops)
   at Jellyfin.Drawing.Skia.SplashscreenBuilder.GenerateSplash(IReadOnlyList`1 posters, IReadOnlyList`1 backdrops, String outputPath)
   at Jellyfin.Drawing.Skia.SkiaEncoder.CreateSplashscreen(IReadOnlyList`1 posters, IReadOnlyList`1 backdrops)
   at Emby.Server.Implementations.Library.SplashscreenPostScanTask.Run(IProgress`1 progress, CancellationToken cancellationToken)
   at Emby.Server.Implementations.Library.LibraryManager.RunPostScanTasks(IProgress`1 progress, CancellationToken cancellationToken)
[2023-04-13 08:51:57.373 -05:00] [INF] "Escanear a Biblioteca de Mídia" Completed after 0 minute(s) and 0 seconds
[2023-04-13 08:51:57.373 -05:00] [INF] ExecuteQueuedTasks```

i run jellyfin and emby on linux, all that is required is:
rclone mount gdrive2: /mnt/gdrive2 --allow-other

imho, you are making this more complex than it needs to be.
adding random flags and using deprecated flags for a deprecated cache remote


How many files are on this drive?
Are there any other files besides "Esquadrão Suicida: Acerto de Contas (2018).mkv"?
Wouldn't it be a problem trying to read a file that has an accented character in the title?

Unless you are using Amazon Drive Storage, it does nothing.

Those are only for the cache backend, which you aren't using.

type = drive
client_id =
client_secret = xxxxxxxxx
scope = drive
token = {"access_token":"xxxxxxxxxx6EZQrUBTk32t1GlvxyepFKmn-CsyN6BZ7UNBxuq66gPNgp3CZB2r9jDmTr0yYO95Y6XGib5fX5M9ha_su87l4Jlb9ywH4RDean4dIVhK0ELwvoifthQU3qNgdDU8zvWZdmyHdqhIWG3TS0SlIzgaCgYKAUMSARESFQF4udJhwgb5HpGQSj0RqkL4llB4aQ0169","token_type":"Bearer","refresh_token":"1//041E6Llg5vovSCgYIARAAGAQSNwF-L9IryH-66wVmipPXwcb_8uduHQTpO8SZlfD07rTP2s_COpxLiaHHJoIiFa9Sa8ACGs8opbk","expiry":"2023-04-13T09:17:08.493443611-05:00"}

type = drive
client_id =
client_secret = xxxxxxxx
scope = drive
token = {"access_token":"xxxxxxx7qXrhgA2OvnRNHgqZSRnUyhQhdZQAjniKwNt232vQZ1oV1qfBCc5IAs79oAJ0mvTBaZWl65JjXuXICMuA0vqgSEkLQfV_qGGax0vhhMZEt4-CFPsJi8sy7m7ibiClAGZL8lGJ-y8rTwaCgYKASgSARESFQF4udJhnQWpTmfDJW9vZhlUoW92wg0169","token_type":"Bearer","refresh_token":"1//04zujB-zCw3EUCgYIARAAGAQSNwF-L9IrVAm-WtbKFOLD4Q8FPvXp8psoYzdAhtYqFLgS0HvbrgG_hYWXWR_GbJ8044JOor0TmUg","expiry":"2023-04-13T08:59:29.357244724-05:00"}
server_side_across_configs = true

type = crypt
remote = gdrive1:PLEX/
filename_encryption = standard
password = xxxxxxx
password2 = xxxxxxx

type = crypt
remote = gdrive2:PLEX
filename_encryption = obfuscate
password = xxxxxx
password2 = xxxxxxxx

Apparently the problem was solved by removing the characters in the media, now jellyfin is scanning and finding the titles. Thank you very much for all your help.

i see from your config file, that you are using two different types of filename_encryption.
does the problem occur with both remotes?

as i know Esquadrão Suicida: Acerto de Contas (2018).mkv works with filename_encryption = standard

One more doubt, when using the rclone mount command as a Linux service, Jellyfin is unable to find the files again.
Here's the configuration:

Description=drive2 Service

ExecStart=/usr/bin/rclone mount gdrive2:PLEX /mnt/drive2 
        --allow-other \
	--umask=002 \
	--uid=0110 \
	--gid=0117 \
        --poll-interval 30s \
	--dir-perms=0770 \
	--file-perms=0664 \
        --log-level DEBUG \
        --log-file /var/log/drive2.log \
ExecStop=/bin/fusermount -u /mnt/drive2


what was the exact command that worked from terminal?

your systemd file does not match the commands you posted?
rclone mount gdrive2: /mnt/drive2
rclone mount gdrive2:PLEX /mnt/drive2

the last line of ExecStart should not have a trailing slash.

The command used that Jellyfin recognized was:
rclone mount gdrive2:PLEX /mnt/drive2 --allow-other --umask=002 --uid=0110 --gid=0117 --dir-perms=0770 --file-perms=0664