Sonarr Hardlinking failed using TRaSH guides
I'm currently setting up my media stack using the TRaSH Guides, but I run into an hardlinking issue. Sonarr copies the files instead of hardlinking them.
I have enabled "Use Hardlinks instead of Copy" in Sonarr and tested (inside the sonarr container) that ln works. qBittorrent downloads files to "/data/torrent" and Sonarr has its root folder set to "/data/media/tv".
For testing I'm building the system on my local Win10 machine using docker-compose and I plan to migrate to the real server (once RAM arrives...)
My docker-compose file
docker-compose.yaml
====
services:
sonarr:
container_name: sonarr
image: ghcr.io/hotio/sonarr
env_file:
- services.env
ports:
- 8989:8989
volumes:
- ./config/sonarr:/config
- ./data:/data
networks:
- media-net
qbittorrent:
container_name: qbittorrent
image: ghcr.io/hotio/qbittorrent
ports:
- 8080:8080
env_file:
- services.env
environment:
- WEBUI_PORTS=8080/tcp,8080/udp
- TORRENTING_PORT=20235
- LIBTORRENT=v1
# Enable VPN!!!
- VPN_ENABLED=true
- # VPN options here
volumes:
- ./config/qBittorrent:/config
- ./data:/data
sysctls:
- net.ipv4.conf.all.src_valid_mark=1
- net.ipv6.conf.all.disable_ipv6=1
cap_add:
- NET_ADMIN
networks:
- media-net
services.env
===
TZ=Europe/Berlin
PUID=1000
PGID=1000
# UMASK=002
I found the following line in my sonarr.debug.log
2026-05-19 21:03:15.3|Debug|DiskTransferService|HardLinkOrCopy \[/data/torrent/sonarr/\[NVN\] Witch Hat Atelier - S01E01 v2 \[WEBRip HEVC 1080p\] \[68E8679A\].mkv\] > \[/data/media/tv/Witch Hat Atelier/Season 1/\[NVN\] Witch Hat Atelier - S01E01 v2 \[WEBRip HEVC 1080p\] \[Sub. Español\].mkv\] 2026-05-19 21:03:15.3|Debug|DiskProvider|Hardlink '/data/torrent/sonarr/\[NVN\] Witch Hat Atelier - S01E01 v2 \[WEBRip HEVC 1080p\] \[68E8679A\].mkv' to '/data/media/tv/Witch Hat Atelier/Season 1/\[NVN\] Witch Hat Atelier - S01E01 v2 \[WEBRip HEVC 1080p\] \[Sub. Español\].mkv' failed.
\[v4.0.17.2952\] System.InvalidOperationException: Operation not permitted ---> Mono.Unix.UnixIOException: Operation not permitted \[EPERM\]. --- End of inner exception stack trace --- at Mono.Unix.UnixMarshal.ThrowExceptionForLastError() at Mono.Unix.UnixMarshal.ThrowExceptionForLastErrorIf(Int32 retval) at Mono.Unix.UnixFileSystemInfo.CreateLink(String path) at NzbDrone.Mono.Disk.DiskProvider.TryCreateHardLink(String source, String destination) in ./Sonarr.Mono/Disk/DiskProvider.cs:line 444
The log seems to indicate that there's a permission error, but I'm not sure where I should change them. If the entire log is needed, I can provide it.
Thanks in advance.