# Handling of symbolic and/or hard links on Linux

**URL:** https://forum.syncthing.net/t/handling-of-symbolic-and-or-hard-links-on-linux/11933
**Category:** Support
**Created:** [August 6, 2018, 3:53pm UTC](https://forum.syncthing.net/t/handling-of-symbolic-and-or-hard-links-on-linux/11933 "2018-08-06T15:53:55Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![chrisisbd](https://forum.syncthing.net/user_avatar/forum.syncthing.net/chrisisbd/32/4307_2.png) [@chrisisbd](https://forum.syncthing.net/u/chrisisbd)
#### Post date: [August 6, 2018, 3:53pm UTC](https://forum.syncthing.net/t/handling-of-symbolic-and-or-hard-links-on-linux/11933/1 "2018-08-06T15:53:55Z")

</div>

I’m a little confused by the FAQ entries on how syncthing handles both symbolic links and hard links.

So, if there is a file in a directory synchronised by syncthing which has other hard links to it will these hard links be lost? I suspect they will because when syncthing updates a file it presumably changes its inode (i.e. it doesn’t update ‘in place’).

… and secondly I _think_ syncthing will synchronise a symbolic link but _not_ the file it points at. I.e. the pointer is preserved/changed but not what it points at.

Do I have these correct?

---

<div class="post-metadata">

### Author: ![imsodin](https://forum.syncthing.net/user_avatar/forum.syncthing.net/imsodin/32/3317_2.png) [@imsodin](https://forum.syncthing.net/u/imsodin)
#### Post date: [August 6, 2018, 4:02pm UTC](https://forum.syncthing.net/t/handling-of-symbolic-and-or-hard-links-on-linux/11933/2 "2018-08-06T16:02:37Z")

</div>

> [@chrisisbd](#):
>
> Do I have these correct?

Yes. Syncthing copies files on all changes, therefore doesn’t preserve hardlinks, and syncs symbolic links themselves, never their targets.

---

<div class="post-metadata">

### Author: ![calmh](https://forum.syncthing.net/user_avatar/forum.syncthing.net/calmh/32/15311_2.png) [@calmh](https://forum.syncthing.net/u/calmh)
#### Post date: [August 6, 2018, 5:43pm UTC](https://forum.syncthing.net/t/handling-of-symbolic-and-or-hard-links-on-linux/11933/3 "2018-08-06T17:43:24Z")

</div>

If this clarifies things for you, let us know how to improve the FAQ entry. In my mind, imsodin said almost exactly what the FAQ entry says. 🙂

---

<div class="post-metadata">

### Author: ![chrisisbd](https://forum.syncthing.net/user_avatar/forum.syncthing.net/chrisisbd/32/4307_2.png) [@chrisisbd](https://forum.syncthing.net/u/chrisisbd)
#### Post date: [August 17, 2018, 11:36am UTC](https://forum.syncthing.net/t/handling-of-symbolic-and-or-hard-links-on-linux/11933/4 "2018-08-17T11:36:35Z")

</div>

Well I think it could do with a little bit of expansion. What the FAQ says is:-

`Symbolic Links (synced, except on Windows, but never followed.)`

This doesn’t quite say “syncthing will synchronise a symbolic link but not the file it points at”

… and:-

`Hard Links (followed, not preserved)`

You really, really don’t “follow” a hard link. I think one should say syncthing always creates a new copy of the file and that the hard link is destroyed. If there happens to be another hard link to the same (original) file then the original file will still exist.

---

<div class="post-metadata">

### Author: ![AudriusButkevicius](https://forum.syncthing.net/user_avatar/forum.syncthing.net/audriusbutkevicius/32/277_2.png) [@AudriusButkevicius](https://forum.syncthing.net/u/AudriusButkevicius)
#### Post date: [August 17, 2018, 11:56am UTC](https://forum.syncthing.net/t/handling-of-symbolic-and-or-hard-links-on-linux/11933/5 "2018-08-17T11:56:09Z")

</div>

We should just say not preserved.

---

<div class="post-metadata">

### Author: ![schneemensch](https://forum.syncthing.net/user_avatar/forum.syncthing.net/schneemensch/32/5216_2.png) [@schneemensch](https://forum.syncthing.net/u/schneemensch)
#### Post date: [August 28, 2018, 9:48am UTC](https://forum.syncthing.net/t/handling-of-symbolic-and-or-hard-links-on-linux/11933/6 "2018-08-28T09:48:00Z")

</div>

To help me understand:

How are symbolic links handled on windows?

---

<div class="post-metadata">

### Author: ![imsodin](https://forum.syncthing.net/user_avatar/forum.syncthing.net/imsodin/32/3317_2.png) [@imsodin](https://forum.syncthing.net/u/imsodin)
#### Post date: [August 28, 2018, 10:01am UTC](https://forum.syncthing.net/t/handling-of-symbolic-and-or-hard-links-on-linux/11933/7 "2018-08-28T10:01:23Z")

</div>

They aren’t. They are skipped when scanning the local disk and they are also skipped when pulling changes from other devices.

---

<div class="post-metadata">

### Author: ![system](https://forum-uploads.syncthingcdn.net/original/2X/0/0b50e0a202b22ae6a67190759e8c868805b8ed9f.png) [@system](https://forum.syncthing.net/u/system)
#### Post date: [September 27, 2018, 10:04am UTC](https://forum.syncthing.net/t/handling-of-symbolic-and-or-hard-links-on-linux/11933/8 "2018-09-27T10:04:52Z")

</div>

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