Sonarr version (exact version): 4.0.11.2680
Mono version (if Sonarr is not running on Windows):
OS: Synology DSM 7.2.2
Debug logs:
2025-01-21 22:48:05.0|Warn|ImportApprovedEpisodes|Couldn't import episode /data/torrents/tv-sonarr/<filename>.mkv
[v4.0.11.2680] System.UnauthorizedAccessException: Access to the path '/Anime/Shangri-La Frontier/Season 02' is denied.
---> System.IO.IOException: Permission denied
--- End of inner exception stack trace ---
at System.IO.FileSystem.CreateDirectory(String fullPath)
at System.IO.Directory.CreateDirectory(String path)
at NzbDrone.Common.Disk.DiskProviderBase.CreateFolder(String path) in ./Sonarr.Common/Disk/DiskProviderBase.cs:line 210
at NzbDrone.Core.MediaFiles.EpisodeFileMovingService.CreateFolder(String directoryName) in ./Sonarr.Core/MediaFiles/EpisodeFileMovingService.cs:line 241
at NzbDrone.Core.MediaFiles.EpisodeFileMovingService.EnsureEpisodeFolder(EpisodeFile episodeFile, Series series, Int32 seasonNumber, String filePath) in ./Sonarr.Core/MediaFiles/EpisodeFileMovingService.cs:line 211
at NzbDrone.Core.MediaFiles.EpisodeFileMovingService.EnsureEpisodeFolder(EpisodeFile episodeFile, LocalEpisode localEpisode, String filePath) in ./Sonarr.Core/MediaFiles/EpisodeFileMovingService.cs:line 179
at NzbDrone.Core.MediaFiles.EpisodeFileMovingService.MoveEpisodeFile(EpisodeFile episodeFile, LocalEpisode localEpisode) in ./Sonarr.Core/MediaFiles/EpisodeFileMovingService.cs:line 87
at NzbDrone.Core.MediaFiles.UpgradeMediaFileService.UpgradeEpisodeFile(EpisodeFile episodeFile, LocalEpisode localEpisode, Boolean copyOnly) in ./Sonarr.Core/MediaFiles/UpgradeMediaFileService.cs:line 80
at NzbDrone.Core.MediaFiles.EpisodeImport.ImportApprovedEpisodes.Import(List`1 decisions, Boolean newDownload, DownloadClientItem downloadClientItem, ImportMode importMode) in ./Sonarr.Core/MediaFiles/EpisodeImport/ImportApprovedEpisodes.cs:line 159
Description of issue:
I’m running Sonarr on a Synology NAS via Docker Compose (i.e. Container Manager), and I can’t access folders owned by another group.
I’m trying to get Sonarr to correctly open and copy files to a folder that is owned by a specific group (i.e. ‘groupA’). Sonarr’s GID is different (i.e ‘dockegroup’). Sonarr’s PID (‘dockerlimited’) is a member of ‘groupA’ as well as ‘dockergroup’.
In other projects, this would either just work (as ‘dockerlimited’ is a member of ‘groupA’ already), or I could solve it by adding Sonarr’s process to groupA by setting group_add:
in the Docker Compose file, but for some reason that doesn’t seem to solve the problem here. When I run id
within Sonarr’s container, I do see groupA
’s GID added, and if I run ls -l /Anime
within the same container, I do see all files with the right permissions (rwxrws–) and the right ownership (userX:groupA).
When I change the folder’s user owner to the same as Sonarr, it works. When I change the folder’s group owner to the same as Sonarr, it works. But if I keep the group owner as groupA
, despite dockerlimited
being a member and despite me adding groupA
via the group_add:
option in Docker Compose file, it just doesn’t work.
Also, ACLs aren’t an option here unfortunately (Synology DSM limitation on external drives…)
Do you know how I can solve this?
Thank you!