# Edit service account while mounted

**URL:** <https://forum.rclone.org/t/edit-service-account-while-mounted/15760>\
**Category:** Help and Support\
**Created:** [April 20, 2020, 8:18pm UTC](https://forum.rclone.org/t/edit-service-account-while-mounted/15760 "2020-04-20T20:18:14Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![hacktek](https://forum.rclone.org/user_avatar/forum.rclone.org/hacktek/32/2064_2.png) [@hacktek](https://forum.rclone.org/u/hacktek)\
**Post date:** [April 20, 2020, 8:18pm UTC](https://forum.rclone.org/t/edit-service-account-while-mounted/15760/1 "2020-04-20T20:18:14Z")

</div>

Is it possible to edit the service\_account\_file flag from rclone.conf while that remote is mounted? Will usage of the mount go through the current value of service\_account\_file or will it use the one from when the mount was originally created (meaning a mount restart is necessary)?

EDIT: would running the following command achieve this?

`rclone config update remote service_account_file /path/to/file.json `

Thanks!

---

<div class="post-metadata">

**Author:** ![Animosity022](https://forum.rclone.org/user_avatar/forum.rclone.org/animosity022/32/451_2.png) [@Animosity022](https://forum.rclone.org/u/Animosity022)\
**Post date:** [April 21, 2020, 12:06pm UTC](https://forum.rclone.org/t/edit-service-account-while-mounted/15760/2 "2020-04-21T12:06:39Z")

</div>

Test it out and check the debug log and see if it works.

---

<div class="post-metadata">

**Author:** ![hacktek](https://forum.rclone.org/user_avatar/forum.rclone.org/hacktek/32/2064_2.png) [@hacktek](https://forum.rclone.org/u/hacktek)\
**Post date:** [April 21, 2020, 4:39pm UTC](https://forum.rclone.org/t/edit-service-account-while-mounted/15760/3 "2020-04-21T16:39:57Z")

</div>

What am I looking for exactly? I don't see anything in the debug logs stating what file was used.

---

<div class="post-metadata">

**Author:** ![Animosity022](https://forum.rclone.org/user_avatar/forum.rclone.org/animosity022/32/451_2.png) [@Animosity022](https://forum.rclone.org/u/Animosity022)\
**Post date:** [April 21, 2020, 5:37pm UTC](https://forum.rclone.org/t/edit-service-account-while-mounted/15760/4 "2020-04-21T17:37:03Z")

</div>

If nothing is shown, you can check your API hits in the console as well and see if the new one is being used.

---

<div class="post-metadata">

**Author:** ![hacktek](https://forum.rclone.org/user_avatar/forum.rclone.org/hacktek/32/2064_2.png) [@hacktek](https://forum.rclone.org/u/hacktek)\
**Post date:** [April 21, 2020, 5:39pm UTC](https://forum.rclone.org/t/edit-service-account-while-mounted/15760/5 "2020-04-21T17:39:09Z")

</div>

I didn't find anything in the log but looking at API activity it looks like changing in place does not work when mounted and traffic sticks to whatever service account was set when mounted.

@ncw is there any command that can be sent to force a refresh without needing tor restart the mount?

---

<div class="post-metadata">

**Author:** ![Animosity022](https://forum.rclone.org/user_avatar/forum.rclone.org/animosity022/32/451_2.png) [@Animosity022](https://forum.rclone.org/u/Animosity022)\
**Post date:** [April 21, 2020, 5:40pm UTC](https://forum.rclone.org/t/edit-service-account-while-mounted/15760/6 "2020-04-21T17:40:13Z")

</div>

What's your use case in changing the credentials of a mount?

---

<div class="post-metadata">

**Author:** ![hacktek](https://forum.rclone.org/user_avatar/forum.rclone.org/hacktek/32/2064_2.png) [@hacktek](https://forum.rclone.org/u/hacktek)\
**Post date:** [April 21, 2020, 5:43pm UTC](https://forum.rclone.org/t/edit-service-account-while-mounted/15760/7 "2020-04-21T17:43:11Z")

</div>

Large library and multiple users so run into API bans every once in a while. Wanted to split those hits across two SA's.

---

<div class="post-metadata">

**Author:** ![Animosity022](https://forum.rclone.org/user_avatar/forum.rclone.org/animosity022/32/451_2.png) [@Animosity022](https://forum.rclone.org/u/Animosity022)\
**Post date:** [April 21, 2020, 5:45pm UTC](https://forum.rclone.org/t/edit-service-account-while-mounted/15760/8 "2020-04-21T17:45:47Z")

</div>

What do you mean banned? You mean you hit the API quota for upload or download?

---

<div class="post-metadata">

**Author:** ![hacktek](https://forum.rclone.org/user_avatar/forum.rclone.org/hacktek/32/2064_2.png) [@hacktek](https://forum.rclone.org/u/hacktek)\
**Post date:** [April 21, 2020, 5:46pm UTC](https://forum.rclone.org/t/edit-service-account-while-mounted/15760/9 "2020-04-21T17:46:19Z")

</div>

Download quota, yes

---

<div class="post-metadata">

**Author:** ![Animosity022](https://forum.rclone.org/user_avatar/forum.rclone.org/animosity022/32/451_2.png) [@Animosity022](https://forum.rclone.org/u/Animosity022)\
**Post date:** [April 21, 2020, 5:52pm UTC](https://forum.rclone.org/t/edit-service-account-while-mounted/15760/10 "2020-04-21T17:52:49Z")

</div>

So the use case, you have some event or trigger and want to change the service accounts on the mount dynamically as the only way to do that now is to remount.

You could always use something like mergerfs and round robin requests on multiple mounts or split the mounts up into a service account for a section or something.

I guess it depends on how problematic the download issue is.

---

<div class="post-metadata">

**Author:** ![hacktek](https://forum.rclone.org/user_avatar/forum.rclone.org/hacktek/32/2064_2.png) [@hacktek](https://forum.rclone.org/u/hacktek)\
**Post date:** [April 21, 2020, 5:56pm UTC](https://forum.rclone.org/t/edit-service-account-while-mounted/15760/11 "2020-04-21T17:56:12Z")

</div>

I did. It's bugged: [https://github.com/trapexit/mergerfs/issues/742](https://github.com/trapexit/mergerfs/issues/742)

The dev has suggested a workaround, let's see if that works.

---

<div class="post-metadata">

**Author:** ![Animosity022](https://forum.rclone.org/user_avatar/forum.rclone.org/animosity022/32/451_2.png) [@Animosity022](https://forum.rclone.org/u/Animosity022)\
**Post date:** [April 21, 2020, 6:12pm UTC](https://forum.rclone.org/t/edit-service-account-while-mounted/15760/12 "2020-04-21T18:12:25Z")

</div>

Did it work with reading files or was just find the issue?

---

<div class="post-metadata">

**Author:** ![hacktek](https://forum.rclone.org/user_avatar/forum.rclone.org/hacktek/32/2064_2.png) [@hacktek](https://forum.rclone.org/u/hacktek)\
**Post date:** [April 21, 2020, 6:37pm UTC](https://forum.rclone.org/t/edit-service-account-while-mounted/15760/13 "2020-04-21T18:37:43Z")

</div>

I haven't tested his suggestion but before it didn't work, plex saw a lot of the content as unavailable when mergerfs ran like that.

---

<div class="post-metadata">

**Author:** ![random404](https://forum.rclone.org/letter_avatar_proxy/v4/letter/r/59ef9b/32.png) [@random404](https://forum.rclone.org/u/random404)\
**Post date:** [April 21, 2020, 9:07pm UTC](https://forum.rclone.org/t/edit-service-account-while-mounted/15760/14 "2020-04-21T21:07:44Z")

</div>

Use rclone union instead of mergerfs, been running with it and so far it's all good.

Just don't know how to do the same mergerfs policies but just the defaults are working for my merge.

And I have always switched the service account while mounted and I think it's always worked for me

---

<div class="post-metadata">

**Author:** ![hacktek](https://forum.rclone.org/user_avatar/forum.rclone.org/hacktek/32/2064_2.png) [@hacktek](https://forum.rclone.org/u/hacktek)\
**Post date:** [April 21, 2020, 9:46pm UTC](https://forum.rclone.org/t/edit-service-account-while-mounted/15760/15 "2020-04-21T21:46:36Z")

</div>

So you have a union that specifies the cloud remote and the local path and you mount the union without using mergerfs? And in these conditions you can update the account in place without unmounting? Sounds promising, I'll give this a shot.

EDIT: nope, it's not working for me. Just tested it out, mounted it on a temp location and have a script running that edits the service account and I'm listing the entire directory structure. There are list hits only in one of the accounts.

---

<div class="post-metadata">

**Author:** ![random404](https://forum.rclone.org/letter_avatar_proxy/v4/letter/r/59ef9b/32.png) [@random404](https://forum.rclone.org/u/random404)\
**Post date:** [April 21, 2020, 10:03pm UTC](https://forum.rclone.org/t/edit-service-account-while-mounted/15760/16 "2020-04-21T22:03:10Z")

</div>

I don't ever write to the union mount, just read from it...

> [union]  
> type = union  
> remotes = 1: 2: 3:

Then I Just update the service accounts of the remotes 1: 2: 3: and I mount the union.

After I did this I never had issues again. I think you can do more complex stuff but I don't know...

`1:` is my main remote, and the others are just backups

---

<div class="post-metadata">

**Author:** ![hacktek](https://forum.rclone.org/user_avatar/forum.rclone.org/hacktek/32/2064_2.png) [@hacktek](https://forum.rclone.org/u/hacktek)\
**Post date:** [April 21, 2020, 10:04pm UTC](https://forum.rclone.org/t/edit-service-account-while-mounted/15760/17 "2020-04-21T22:04:29Z")

</div>

Do you restart the union after changing any of the service accounts?

---

<div class="post-metadata">

**Author:** ![random404](https://forum.rclone.org/letter_avatar_proxy/v4/letter/r/59ef9b/32.png) [@random404](https://forum.rclone.org/u/random404)\
**Post date:** [April 21, 2020, 10:31pm UTC](https://forum.rclone.org/t/edit-service-account-while-mounted/15760/18 "2020-04-21T22:31:58Z")

</div>

Never...

What I'd like is a way to make it read 1: first, since the backups are not always in sync

---

<div class="post-metadata">

**Author:** ![hacktek](https://forum.rclone.org/user_avatar/forum.rclone.org/hacktek/32/2064_2.png) [@hacktek](https://forum.rclone.org/u/hacktek)\
**Post date:** [April 21, 2020, 10:57pm UTC](https://forum.rclone.org/t/edit-service-account-while-mounted/15760/19 "2020-04-21T22:57:25Z")

</div>

How do you validate that you're using the different service accounts?

---

<div class="post-metadata">

**Author:** ![random404](https://forum.rclone.org/letter_avatar_proxy/v4/letter/r/59ef9b/32.png) [@random404](https://forum.rclone.org/u/random404)\
**Post date:** [April 22, 2020, 1:37pm UTC](https://forum.rclone.org/t/edit-service-account-while-mounted/15760/20 "2020-04-22T13:37:46Z")

</div>

I'm not 100% sure but I never had any issues again

[Next page](https://forum.rclone.org/t/edit-service-account-while-mounted/15760.md?page=2)
