Hi,
I am experiencing a problem syncing symlinks from Linux or FreeBSD to Termux.
To test I create on each platform, in a synced folder, a folder per os with a symlink:
Linux
❯ uname -a
Linux linuxbox 6.6.83 #1-NixOS SMP PREEMPT_DYNAMIC Thu Mar 13 11:58:41 UTC 2025 x86_64 GNU/Linux
❯ syncthing -version
syncthing v1.28.0 "Gold Grasshopper" (go1.23.7 linux-amd64) nix@nix 1980-01-01 00:00:00 UTC [noupgrade]
❯ mkdir created-on-linux
❯ touch created-on-linux/target
❯ ln -s created-on-linux/target created-on-linux/symlink
❯ ls -al created-on-linux/
total 8
drwxr-xr-x 2 xx users 4096 abr 14 10:04 .
drwxr-xr-x 3 xx users 4096 abr 14 09:56 ..
lrwxrwxrwx 1 xx users 23 abr 14 10:04 symlink -> created-on-linux/target
-rw-r--r-- 1 xx users 0 abr 14 10:04 target
FreeBSD
❯ uname -a
FreeBSD freebsdbox 14.2-RELEASE FreeBSD 14.2-RELEASE releng/14.2-n269506-c8918d6c7412 GENERIC amd64
❯ syncthing -version
syncthing v1.28.1 "Gold Grasshopper" (go1.22.11 freebsd-amd64) ports@freebsd 2025-01-31 14:28:28 UTC [noupgrade]
❯ mkdir created-on-freebsd
❯ touch created-on-freebsd/target
❯ ln -s created-on-freebsd/target created-on-freebsd/symlink
❯ ls -al ./created-on-freebsd
total 18
drwxr-xr-x 2 root wheel 4 Apr 14 10:07 .
drwxr-xr-x 4 983 wheel 4 Apr 14 10:06 ..
lrwxr-xr-x 1 root wheel 25 Apr 14 10:07 symlink -> created-on-freebsd/target
-rw-r--r-- 1 root wheel 0 Apr 14 10:07 target
Termux
❯ uname -a
Linux localhost 6.1.131-android14-11-gedc743c140b3 #1 SMP PREEMPT Fri Apr 4 04:56:18 UTC 2025 aarch64 Android
❯ syncthing -version
syncthing v1.29.3 "Gold Grasshopper" (go1.24.1 android-arm64) builder@24fe6cf991b2 2025-03-12 13:18:33 UTC [noupgrade]
❯ pwd
/data/data/com.termux/files/home/shell/tmp/
❯ mkdir created-on-termux
❯ touch created-on-termux/target
❯ ln -s created-on-termux/target created-on-termux/symlink
❯ ls -al ./created-on-termux
total 7
drwx------. 2 u0_a165 u0_a165 3452 Apr 14 13:54 .
drwxr-xr-x. 5 u0_a165 u0_a165 3452 Apr 14 13:53 ..
lrwxrwxrwx. 1 u0_a165 u0_a165 24 Apr 14 13:54 symlink -> created-on-termux/target
-rw-------. 1 u0_a165 u0_a165 0 Apr 14 13:54 target
Now after sync, I see the symlinks being synchronized but the ones from Linux or FreeBSD to Termux. Termux to Linux or FreeBSD works fine. I do not see any error in the logs or the UI.
Linux
❯ tree
.
├── created-on-freebsd
│ ├── symlink -> created-on-freebsd/target
│ └── target
├── created-on-linux
│ ├── symlink -> created-on-linux/target
│ └── target
└── created-on-termux
├── symlink -> created-on-termux/target
└── target
4 directories, 6 files
FreeBSD
❯ tree
.
├── created-on-freebsd
│ ├── symlink -> created-on-freebsd/target
│ └── target
├── created-on-linux
│ ├── symlink -> created-on-linux/target
│ └── target
└── created-on-termux
├── symlink -> created-on-termux/target
└── target
4 directories, 6 files
Termux (this is where the problem is)
❯ tree
.
├── created-on-freebsd
│ └── target
├── created-on-linux
│ └── target
└── created-on-termux
├── symlink -> created-on-termux/target
└── target
4 directories, 4 files
I searched for a reason both at the Termux and Syncthing levels. The only similar unresolved issue I could find is this one
I can confirm Termux support symlinks and I am on the main storage (no mounted, external or FAT fs)
❯ pwd
/data/data/com.termux/files/shell/tmp/
Any idea what could cause this? Could it be a bug? How can I investigate further?
Many thanks for your help