# Thinlinc HA Synchronization does not keeps permissions

**URL:** <https://community.thinlinc.com/t/thinlinc-ha-synchronization-does-not-keeps-permissions/203>\
**Category:** Community Support\
**Tags:** linux, tlserver, thinlinc\
**Created:** [13 July 2021 15:24 UTC](https://community.thinlinc.com/t/thinlinc-ha-synchronization-does-not-keeps-permissions/203 "2021-07-13T15:24:49Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![s0p4L1n](https://avatars.discourse-cdn.com/v4/letter/s/ecc23a/32.png) [@s0p4L1n](https://community.thinlinc.com/u/s0p4L1n)\
**Post date:** [13 July 2021 15:24 UTC](https://community.thinlinc.com/t/thinlinc-ha-synchronization-does-not-keeps-permissions/203/1 "2021-07-13T15:24:50Z")

</div>

Hello,

I’ve suceeded to implement synchronization between my two thinlinc nodes.

The problem is that the /home/directory of my users does not keep the permission.

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/thinlinc/original/1X/c58dfe48133cfc9d10f79db53f3390e8187108fc.png)

Everything is owned by root user after the sync to the secondary nodes…

I tried with the -p argument like with rsync command but did not worked.

Do you have a solution ?

Thanks !

---

<div class="post-metadata">

**Author:** ![aaron](https://dub1.discourse-cdn.com/flex005/user_avatar/community.thinlinc.com/aaron/32/13_2.png) [@aaron](https://community.thinlinc.com/u/aaron)\
**Post date:** [14 July 2021 02:51 UTC](https://community.thinlinc.com/t/thinlinc-ha-synchronization-does-not-keeps-permissions/203/2 "2021-07-14T02:51:26Z")

</div>

@s0p4L1n which command are you running exactly?

---

<div class="post-metadata">

**Author:** ![s0p4L1n](https://avatars.discourse-cdn.com/v4/letter/s/ecc23a/32.png) [@s0p4L1n](https://community.thinlinc.com/u/s0p4L1n)\
**Post date:** [15 July 2021 06:51 UTC](https://community.thinlinc.com/t/thinlinc-ha-synchronization-does-not-keeps-permissions/203/3 "2021-07-15T06:51:35Z")

</div>

I ran:

```auto
tl-rsync-all /home/

```

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/thinlinc/original/1X/60ec6d2a51faa8d77da177cb45cd050796a0ee08.png)

But I figured out that the thinlinc session data is in `/var/lib/vsm/session` and not `/home`

`/home` is only the user session when logged, not the data user session so I don’t need to sync this.

As the documentation does not precise if the synchronization between all nodes is automatic or not, I have setup a crontab that launch` tl-rsync-all /var/lib/vsm` every minute.

Thanks,

---

<div class="post-metadata">

**Author:** ![s0p4L1n](https://avatars.discourse-cdn.com/v4/letter/s/ecc23a/32.png) [@s0p4L1n](https://community.thinlinc.com/u/s0p4L1n)\
**Post date:** [15 July 2021 11:47 UTC](https://community.thinlinc.com/t/thinlinc-ha-synchronization-does-not-keeps-permissions/203/4 "2021-07-15T11:47:43Z")

</div>

Also, I just found that, it ask me the root password for tl-rsync-all so It does not work in the crontab

![image](https://europe1.discourse-cdn.com/flex005/uploads/thinlinc/original/1X/0289f4653e7fdd012228aed4605ce473480ea7f0.png)

How can I pass the command without the password asking ?

---

<div class="post-metadata">

**Author:** ![aaron](https://dub1.discourse-cdn.com/flex005/user_avatar/community.thinlinc.com/aaron/32/13_2.png) [@aaron](https://community.thinlinc.com/u/aaron)\
**Post date:** [15 July 2021 22:46 UTC](https://community.thinlinc.com/t/thinlinc-ha-synchronization-does-not-keeps-permissions/203/5 "2021-07-15T22:46:39Z")

</div>

@s0p4L1n `tl-rsync-all` is essentially just a convenience wrapper around `rsync`, to avoid having to sync to each host manually. Apart from that it should behave in exactly the same way as normal `rsync`. Perhaps the flag you’re looking for with regards to directory ownership is `-a`, which will preserve user and group (among other things).

> [@s0p4L1n](#):
>
> How can I pass the command without the password asking ?

You can set up public key authentication to achieve this. You can find some tips under the `tl-ssh-all` section in [Commands on the ThinLinc Server — The ThinLinc Administrator's Guide 4.15.0 build 3358 documentation](https://www.cendio.com/resources/docs/tag/commands.html) (same principles apply for `tl-rsync-all`).

Note that this tool isn’t _normally_ used for syncing `/home`. Generally the `/home` directory in a ThinLinc cluster will be located on a remote fileserver, and mounted on each host (via NFS, for example).

> [@s0p4L1n](#):
>
> But I figured out that the thinlinc session data is in `/var/lib/vsm/session` and not `/home`

Correct, but you shouldn’t need to sync it manually. This data will by synced across two ThinLinc _masters_ (circled in red below) automatically if you have them set up in a high-availability configuration, however the session data does not need to reside on the _agents_.

 ![](https://europe1.discourse-cdn.com/flex005/uploads/thinlinc/original/1X/bf9af1ff57d46ea5dcece3165892be381c26d344.png)

HTH!

---

<div class="post-metadata">

**Author:** ![s0p4L1n](https://avatars.discourse-cdn.com/v4/letter/s/ecc23a/32.png) [@s0p4L1n](https://community.thinlinc.com/u/s0p4L1n)\
**Post date:** [16 July 2021 07:37 UTC](https://community.thinlinc.com/t/thinlinc-ha-synchronization-does-not-keeps-permissions/203/6 "2021-07-16T07:37:28Z")

</div>

Thanks for the clarification, I already setted the pubkey authentication and it is working well.  
But when I execute the tl-rsync-all, it still ask the password.  
It sync, then ask the password as shown below.

![image](https://europe1.discourse-cdn.com/flex005/uploads/thinlinc/original/1X/0289f4653e7fdd012228aed4605ce473480ea7f0.png)

What/where is the data(folders/files) that synced automatically across the two ThinLinc masters ?  
And how to verify that the sync is working between two-HA masters ?

Is `it /var/lib/vsm/session` synced automatically ? Because I tried last time, and one user that was connecting to the primary, setted his Google Chrome preferences, and then the second times, it connect to the secondary and the preferences was gone (not synced).

And for the agent I did not know that this was not a requirement to sync session data, so it is always the VSMServer that is manage the data session and the agent is only here to open the session ?

---

<div class="post-metadata">

**Author:** ![aaron](https://dub1.discourse-cdn.com/flex005/user_avatar/community.thinlinc.com/aaron/32/13_2.png) [@aaron](https://community.thinlinc.com/u/aaron)\
**Post date:** [17 July 2021 00:14 UTC](https://community.thinlinc.com/t/thinlinc-ha-synchronization-does-not-keeps-permissions/203/7 "2021-07-17T00:14:48Z")

</div>

> [@s0p4L1n](#):
>
> It sync, then ask the password as shown below.

I’m not sure where that prompt might be coming from then sorry, does it help to increase verbosity?

> [@s0p4L1n](#):
>
> Is `it /var/lib/vsm/session` synced automatically ?

Yes, it is synced between two master servers as long as HA is set up and configured properly. See [https://www.cendio.com/resources/docs/tag/ch06s02.html](https://www.cendio.com/resources/docs/tag/ch06s02.html)

> [@s0p4L1n](#):
>
> Because I tried last time, and one user that was connecting to the primary, setted his Google Chrome preferences, and then the second times, it connect to the secondary and the preferences was gone (not synced).

These preferences will be stored in the user’s home directory, so it is important that the home directories are consistent across agents. This is normally done by mounting the `/home` directories from a central file server.

> [@s0p4L1n](#):
>
> And for the agent I did not know that this was not a requirement to sync session data, so it is always the VSMServer that is manage the data session and the agent is only here to open the session ?

Yes, that’s right. A ThinLinc cluster will always have exactly one active master server, and one or more agent servers where the sessions themselves are run. In a HA configuration, there will be two masters, one active and one failover.

---

<div class="post-metadata">

**Author:** ![s0p4L1n](https://avatars.discourse-cdn.com/v4/letter/s/ecc23a/32.png) [@s0p4L1n](https://community.thinlinc.com/u/s0p4L1n)\
**Post date:** [22 July 2021 16:07 UTC](https://community.thinlinc.com/t/thinlinc-ha-synchronization-does-not-keeps-permissions/203/8 "2021-07-22T16:07:14Z")

</div>

I will do like you said, because even with -a argument, the /home is copied but some files are not copied in a good way, and there is some Chrome errors if you log again, and it used another agent to host the session:

> The profile appears to be in use by another Google Chrome process (3412) on another computer (“previous name of the computer”). Chrome has locked the profile so that it doesn’t get corrupted. If you are sure no other processes are using this profile, you can unlock the profile and relaunch Chrome.

And it is because of the `tl-rsync-all -a /home`, it sync the /home of master node to all cluster nodes.

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/thinlinc/original/1X/bfaa4d67dec3309b957d8710a952d044d16879a4.png)

So yeah, all /home mounted on the same NFS share, no problem after this.

Thanks for all the infos and the help you provided !
