[SOLVED] Can't write to SMB drive. Permissions?

Sonarr version (exact version): Sonarr Ver. 2.0.0.5252
Mono version (if Sonarr is not running on Windows): Mono JIT compiler version 5.12.0
OS: Ubuntu Server
Debug logs:
Description of issue: Can’t write to samba drive?

I’ve run Sonarr successfully on my Synology for some time, but recently moved Sonarr to a new Ubuntu Server while leaving my TV shows on the Synology NAS.

I’ve successfully mounted a drive so Sonarr is able to catalogue the shows on the NAS but I’m having a problem moving the shows to the NAS once they’re downloaded on the Ubuntu Server computer. As a test, I set the destination folder to be the Ubuntu machine and it worked fine, so I’m fairly sure it’s a permissions issue moving to the NAS. Here’s the log.

Couldn't import episode /data/incomplete/Andi.Mack.S01E01.XviD-AFG/Andi.Mack.S01E01.XviD-AFG.avi: Access to the path "/data/incomplete/Andi.Mack.S01E01.XviD-AFG/Andi.Mack.S01E01.XviD-AFG.avi" or "/synology/TV Shows/Andi Mack/Season 1/Andi.Mack.S01E01.XviD-AFG.avi.partial~" is denied.
System.UnauthorizedAccessException: Access to the path "/data/incomplete/Andi.Mack.S01E01.XviD-AFG/Andi.Mack.S01E01.XviD-AFG.avi" or "/synology/TV Shows/Andi Mack/Season 1/Andi.Mack.S01E01.XviD-AFG.avi.partial~" is denied.
  at System.IO.File.Copy (System.String sourceFileName, System.String destFileName, System.Boolean overwrite) [0x00193] in /build/mono/src/mono/mcs/class/corlib/System.IO/File.cs:111 
  at NzbDrone.Common.Disk.DiskProviderBase.CopyFileInternal (System.String source, System.String destination, System.Boolean overwrite) [0x00000] in C:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Common\Disk\DiskProviderBase.cs:208 
  at NzbDrone.Mono.Disk.DiskProvider.CopyFileInternal (System.String source, System.String destination, System.Boolean overwrite) [0x00076] in C:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Mono\Disk\DiskProvider.cs:129 
  at NzbDrone.Common.Disk.DiskProviderBase.CopyFile (System.String source, System.String destination, System.Boolean overwrite) [0x000bc] in C:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Common\Disk\DiskProviderBase.cs:203 
  at NzbDrone.Common.Disk.DiskTransferService.TryCopyFileTransactional (System.String sourcePath, System.String targetPath, System.Int64 originalSize) [0x00108] in C:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Common\Disk\DiskTransferService.cs:462 
  at NzbDrone.Common.Disk.DiskTransferService.TransferFile (System.String sourcePath, System.String targetPath, NzbDrone.Common.Disk.TransferMode mode, System.Boolean overwrite, NzbDrone.Common.Disk.DiskTransferVerificationMode verificationMode) [0x0034a] in C:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Common\Disk\DiskTransferService.cs:289 
  at NzbDrone.Common.Disk.DiskTransferService.TransferFile (System.String sourcePath, System.String targetPath, NzbDrone.Common.Disk.TransferMode mode, System.Boolean overwrite, System.Boolean verified) [0x0000e] in C:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Common\Disk\DiskTransferService.cs:196 
  at NzbDrone.Core.MediaFiles.EpisodeFileMovingService.TransferFile (NzbDrone.Core.MediaFiles.EpisodeFile episodeFile, NzbDrone.Core.Tv.Series series, System.Collections.Generic.List`1[T] episodes, System.String destinationFilePath, NzbDrone.Common.Disk.TransferMode mode) [0x0012c] in C:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Core\MediaFiles\EpisodeFileMovingService.cs:119 
  at NzbDrone.Core.MediaFiles.EpisodeFileMovingService.CopyEpisodeFile (NzbDrone.Core.MediaFiles.EpisodeFile episodeFile, NzbDrone.Core.Parser.Model.LocalEpisode localEpisode) [0x0006b] in C:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Core\MediaFiles\EpisodeFileMovingService.cs:94 
  at NzbDrone.Core.MediaFiles.UpgradeMediaFileService.UpgradeEpisodeFile (NzbDrone.Core.MediaFiles.EpisodeFile episodeFile, NzbDrone.Core.Parser.Model.LocalEpisode localEpisode, System.Boolean copyOnly) [0x00167] in C:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Core\MediaFiles\UpgradeMediaFileService.cs:72 
  at NzbDrone.Core.MediaFiles.EpisodeImport.ImportApprovedEpisodes.Import (System.Collections.Generic.List`1[T] decisions, System.Boolean newDownload, NzbDrone.Core.Download.DownloadClientItem downloadClientItem, NzbDrone.Core.MediaFiles.EpisodeImport.ImportMode importMode) [0x00272] in C:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Core\MediaFiles\EpisodeImport\ImportApprovedEpisodes.cs:107

I’m fairly new to Ubuntu so ciould someone suggest some things for me to take a look at please?

it looks like sonarr is trying to access the files while theyre still downloading? i would have expected them to be in /data/complete first

something funky is going on if your download client is telling sonarr the job is complete but it actually isnt

what download client are you using? is it running on the ubuntu server as well? what folders are set for complete and incomplete jobs?

Thanks for the help. NOW SOLVED!

I had /data/incomplete as the completed folder, which caused a confusing message but wasn’t the cause of the problem. Using the series editor I chose the destination folder to be elsewhere on the same network drive. As such I established that it was a problem with my Synology NAS rather than Sonarr or my Ubuntu setup.

It turned out that permissions hadn’t been set correctly on the destination folder. I solved it by giving ‘others’ write access in in Synology File Manager.

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