# Rclone + encryption + Google Drive + Plex + Windows Serveur 2016

**URL:** <https://forum.rclone.org/t/rclone-encryption-google-drive-plex-windows-serveur-2016/26922>\
**Category:** Help and Support\
**Created:** [October 11, 2021, 12:52pm UTC](https://forum.rclone.org/t/rclone-encryption-google-drive-plex-windows-serveur-2016/26922 "2021-10-11T12:52:17Z")\
**Posts on this page:** 5\
**Page:** 2

<div class="post-metadata">

**Author:** ![VBB](https://forum.rclone.org/user_avatar/forum.rclone.org/vbb/32/19628_2.png) [@VBB](https://forum.rclone.org/u/VBB)\
**Post date:** [October 14, 2021, 4:04pm UTC](https://forum.rclone.org/t/rclone-encryption-google-drive-plex-windows-serveur-2016/26922/21 "2021-10-14T16:04:05Z")

</div>

> [@markettepigeon](#):
>
> When I send some things I get this message to every file (but I think this is normal as the cache is not enabled) -\> WriteFileHandle: Truncate: Can't change size without --vfs-cache -mode\> = writes

What exactly are you doing when you get this message? Why is Rclone trying to change the size of files? I don't ever see this one.

> [@markettepigeon](#):
>
> Sometimes I have capricious files: Windows tells me that I do not have the authorization to copy the file because I do not have the rights.  
> If I click on start over, it works.  
> However I have to do it for each file (when I have the problem)

Does this happen when you move files from the local disk to the mount? Are you logged in as admin? I don't copy or move anything from local disk into the mount. I only move things around in the mount after they're already uploaded.

> [@markettepigeon](#):
>
> I looked a bit on the forum to do a scheduled task of my edit script, but this is not working.  
> I made so that this one opens with system, elevated privilege.  
> Here is my montage:  
> "cd c:\rclone  
> rclone mount --attr-timeout 5000h --dir-cache-time 5000h --drive-pacer-burst 200 --drive-pacer-min-sleep 10ms --rc --user-agent scanserie --vfs-read-chunk-size 1M -v remote: C:\mount\Serveur"

I don't use scheduled tasks or Rclone as a service, because I like to see what's happening at all times. So I run my commands from batch files, and the resulting DOS window stays open permanently until I close it manually. My batch for the read-only mount (the one that Plex reads from), for example, is:

@echo off  
title Rclone Mount READ ONLY  
D:\Programs\Rclone\rclone mount --attr-timeout 5000h --dir-cache-time 5000h --drive-pacer-burst 200 --drive-pacer-min-sleep 10ms --poll-interval 0 --rc --read-only --user-agent \*\*\*\*\*\*\* --vfs-read-chunk-size 1M -v Google\_Drive\_Crypt: G:  
pause

> [@markettepigeon](#):
>
> - Last problem is when I do a scan via Plex Media Scanner.exe.  
> This one takes a very long time to complete (even when everything has been scanned), whereas if I do the scan by hand (from Plex) it works fine.  
> Here is my script:  
> "echo -- Lancement du programme %date%-%time% --------------------------------------------\>\> C:\Scripts\log\_RcloneScanManga.log
> 
> "C:\Program Files (x86)\Plex\Plex Media Server\Plex Media Scanner.exe" --scan --refresh --section 28 \>\> C:\Scripts\log\_RcloneScanManga.log

Not sure why running the scanner via script would take longer than running it via the GUI. It's not something I've ever done, though. Have you looked at the scanner logs in the Plex data folder to see if there's any difference?

---

<div class="post-metadata">

**Author:** ![asdffdsa](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/848f3c/32.png) [@asdffdsa](https://forum.rclone.org/u/asdffdsa)\
**Post date:** [October 14, 2021, 4:26pm UTC](https://forum.rclone.org/t/rclone-encryption-google-drive-plex-windows-serveur-2016/26922/22 "2021-10-14T16:26:07Z")

</div>

> [@markettepigeon](#):
>
> scheduled task of my edit script, but this is not working

when using a scheduled task, to see what rclone is doing, need to use a log file, `--log-level=INFO --log-file=c:\path\to\folder\log.txt

when running a task as system user, the user profile location changes and thus the default location of the rclone config file.

for example, let's say i open two command prompts.

- one command prompt running as my username
- one command prompt running as system user.

notice that the location of the config file changes.

```auto
C:\Users\user01>whoami
en08\user01

C:\Users\user01>echo %userprofile%
C:\Users\user01

C:\Users\user01>c:\data\rclone\scripts\rclone.exe config file
Configuration file doesn't exist, but rclone will use this path:
C:\Users\user01\AppData\Roaming\rclone\rclone.conf

```

```auto
C:\Windows\system32>whoami
nt authority\system

C:\Windows\system32>echo %userprofile%
C:\Windows\system32\config\systemprofile

C:\Windows\system32>c:\data\rclone\scripts\rclone.exe config file
Configuration file doesn't exist, but rclone will use this path:
C:\Windows\system32\config\systemprofile\AppData\Roaming\rclone\rclone.conf

```

so harcode the location of the config file

- `--config=C:\Users\user01\AppData\Roaming\rclone\rclone.conf`  
or
- use a environment variable  
`@set RCLONE_CONFIG=C:\Users\user01\AppData\Roaming\rclone\rclone.conf`  
or
- what i do - keep the rclone.conf file in the same folder as rclone.exe.  
[https://rclone.org/docs/#config-config-file](https://rclone.org/docs/#config-config-file)

> ```
> Rclone will look for an existing configuration file in any of the following locations, in priority order:
> 1. rclone.conf (in program directory, where rclone executable is)
> 2. %APPDATA%/rclone/rclone.conf (only on Windows)
> 3. $XDG_CONFIG_HOME/rclone/rclone.conf (on all systems, including Windows)
> 4. ~/.config/rclone/rclone.conf (see below for explanation of ~ symbol)
> 5. ~/.rclone.conf
> 
> ```

---

<div class="post-metadata">

**Author:** ![markettepigeon](https://forum.rclone.org/letter_avatar_proxy/v4/letter/m/43a26b/32.png) [@markettepigeon](https://forum.rclone.org/u/markettepigeon)\
**Post date:** [October 15, 2021, 7:16am UTC](https://forum.rclone.org/t/rclone-encryption-google-drive-plex-windows-serveur-2016/26922/23 "2021-10-15T07:16:05Z")

</div>

Hello,

I had followed all your instructions before your answer and it had not worked.  
I did the same this morning and this time it worked :-D.  
Thank you again for your very detailed answers.

Rclone had a very good community.

Good day,

---

<div class="post-metadata">

**Author:** ![markettepigeon](https://forum.rclone.org/letter_avatar_proxy/v4/letter/m/43a26b/32.png) [@markettepigeon](https://forum.rclone.org/u/markettepigeon)\
**Post date:** [October 15, 2021, 7:26am UTC](https://forum.rclone.org/t/rclone-encryption-google-drive-plex-windows-serveur-2016/26922/24 "2021-10-15T07:26:26Z")

</div>

> [@VBB](#):
>
> Que faites-vous exactement lorsque vous recevez ce message ? Pourquoi Rclone essaie-t-il de modifier la taille des fichiers ? Je ne vois jamais celui-ci.

When I get this message I just don't do anything because the copy is working.  
I don't know why I got this message.

> [@VBB](#):
>
> Cela se produit-il lorsque vous déplacez des fichiers du disque local vers le montage ? Êtes-vous connecté en tant qu'administrateur ? Je ne copie ni ne déplace rien du disque local vers le support. Je ne déplace les choses dans la monture qu'une fois qu'elles sont déjà téléchargées.

No I have not yet tested from my local drive.  
I got this error message (rarely) when I move from my NAS (in samba) to the Rclone mount folder.  
I got the same error message from my network drive that works with Mountain Duck to the rclone folder.  
I copy files that are already downloaded (and not currently downloading).  
I'm administrator.

 ![rclone](https://forum.rclone.org/uploads/default/original/2X/8/8d2def1b2b3c461bf9e690105d62c152535727f3.png)

> [@VBB](#):
>
> Je ne sais pas pourquoi l'exécution du scanner via un script prendrait plus de temps que de l'exécuter via l'interface graphique. Ce n'est pas quelque chose que j'ai jamais fait, cependant. Avez-vous regardé les journaux du scanner dans le dossier de données Plex pour voir s'il y a une différence ?

I don't know too.  
I will have to analyze the log file.

---

<div class="post-metadata">

**Author:** ![system](https://forum.rclone.org/uploads/default/original/2X/3/39ad3235f6ffec76ccd0c81616bd55697b4c300d.png) [@system](https://forum.rclone.org/u/system)\
**Post date:** [November 14, 2021, 7:26am UTC](https://forum.rclone.org/t/rclone-encryption-google-drive-plex-windows-serveur-2016/26922/25 "2021-11-14T07:26:34Z")

</div>

Closed on November 14, 2021, 7:26am UTC

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

[Previous page](https://forum.rclone.org/t/rclone-encryption-google-drive-plex-windows-serveur-2016/26922.md?page=1)
