Unable to apply permissions error

Sonarr version (exact version): 2.0.0.5344
Mono version (if Sonarr is not running on Windows):5.20.1.34
OS: LInux - Unraid
Debug logs:
Description of issue:
I seem to have encountered a problem with Sonarr copying over the tv show it downloaded (or passed to deluge).

So Sonarr found the tv show I added (Homecoming), passed it to deluge to download, which it successfully did on my seedbox. I then have Syncthing syncing the downloads to a folder on my local server. This worked as well. The problem I ran into is that Sonarr only moved episode 4 from that folder to my tv folder. It left all the other episodes alone. Not sure why exactly but I do see the following error in the logs which I have no idea what that means. I noticed this on another series I just added

Unable to apply permissions to: /tv/Homeland (2011)/series.xml: Error setting file owner and/or group: EPERM
zbDrone.Mono.Disk.LinuxPermissionsException: Error setting file owner and/or group: EPERM
at NzbDrone.Mono.Disk.DiskProvider.SetOwner (System.String path, System.String user, System.String group) [0x00057] in C:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Mono\Disk\DiskProvider.cs:223
at NzbDrone.Mono.Disk.DiskProvider.SetPermissions (System.String path, System.String mask, System.String user, System.String group) [0x00008] in C:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Mono\Disk\DiskProvider.cs:75
at NzbDrone.Core.MediaFiles.MediaFileAttributeService.SetMonoPermissions (System.String path, System.String permissions) [0x0000f] in C:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Core\MediaFiles\MediaFileAttributeService.cs:

It means you’ve told Sonarr to change the owner/group when it imports and it can’t. Only root can take ownership or give files away, so at most you could only change the group.

Unless you need to do something with the ownership you should disable those settings.

Ok I removed or disabled the Permissions in Sonarr. I then deleted the show and folder. Then went back into Sonarr and added the tv show. It did so and no errors until is tried to import the files. Now I get
Import failed, path does not exist or is not accessible by Sonarr: /data/Seedbox_Torrents/The.No.1.Ladies.Detective.Agency.S01.1080p.AMZN.WEB-DL.DDP5.1.H.264-RCVR.
What’s odd is it did import one episode from the folder, then gave the error for the other episodes. If the path was not valid, why can it import one episode?

I’m wondering if the folder is locked somehow while the files are downloading and Sonarr is trying to grab them. It only seems to happen when downloading a season that is in a sub folder. If I download a single episode into the root folder /seedbox torrents, it copies it fine.

In Sonarr I do have my remote mapping setup
Host - /home/user/Completed/
Remote Path - /data/Seedbox_Torrents/

Was there more than 1 file there when the import was started?
Are you syncing files from the seedbox or mounting it, with something like sshfs?

Without debug logs of the import before the error we can only guess at what the issue may be.

How do I provide the debug logs?
Yes, I am using syncthing on the seedbox and on my server. Syncthing downloads/copies the files on the seedbox to /seedbox-torrents on my local server.
Not sure how many episodes where in the folder at the time sonarr started importing. All files in the folder have a time stamp of 3:51 today.

Can’t see how to attach a text file, not jpegs…I can see the following, not sure if it helps

0-5-27 14:33:50.2|Info|DownloadDecisionMaker|Processing 101 releases
20-5-27 14:33:55.4|Info|DownloadService|Report sent to seedbox. The No. 1 Ladies' Detective Agency S01 1080p AMZN WEB-DL DD+ 5.1 H.264-RCVR
20-5-27 14:33:55.8|Info|RssSyncService|RSS Sync Completed. Reports found: 101, Reports grabbed: 1
20-5-27 14:37:49.5|Info|SceneMappingService|Updating Scene mappings
20-5-27 14:49:22.8|Info|RssSyncService|Starting RSS Sync
20-5-27 14:49:25.2|Info|DownloadDecisionMaker|Processing 100 releases
20-5-27 14:49:26.5|Info|RssSyncService|RSS Sync Completed. Reports found: 100, Reports grabbed: 0
20-5-27 15:04:56.2|Info|RssSyncService|Starting RSS Sync
20-5-27 15:04:57.4|Info|DownloadDecisionMaker|Processing 100 releases
20-5-27 15:04:58.8|Info|RssSyncService|RSS Sync Completed. Reports found: 100, Reports grabbed: 0
20-5-27 15:20:01.5|Info|RssSyncService|Starting RSS Sync
20-5-27 15:20:05.3|Info|DownloadDecisionMaker|Processing 100 releases
20-5-27 15:20:06.6|Info|RssSyncService|RSS Sync Completed. Reports found: 100, Reports grabbed: 0
20-5-27 15:35:07.6|Info|RssSyncService|Starting RSS Sync
20-5-27 15:35:09.3|Info|DownloadDecisionMaker|Processing 100 releases
20-5-27 15:35:10.6|Info|RssSyncService|RSS Sync Completed. Reports found: 100, Reports grabbed: 0
20-5-27 15:50:13.2|Info|RssSyncService|Starting RSS Sync
20-5-27 15:50:14.7|Info|DownloadDecisionMaker|Processing 100 releases
20-5-27 15:50:16.0|Info|RssSyncService|RSS Sync Completed. Reports found: 100, Reports grabbed: 0
20-5-27 15:53:45.4|Error|DownloadedEpisodesImportService|Import failed, path does not exist or is not accessible by Sonarr: /data/Seedbox_Torrents/The.No.1.Ladies.Detective.Agency.S01.1080p.AMZN.WEB-DL.DDP5.1.H.264-RCVR
20-5-27 15:55:15.6|Error|DownloadedEpisodesImportService|Import failed, path does not exist or is not accessible by Sonarr: /data/Seedbox_Torrents/The.No.1.Ladies.Detective.Agency.S01.1080p.AMZN.WEB-DL.DDP5.1.H.264-RCVR
20-5-27 15:56:46.0|Error|DownloadedEpisodesImportService|Import failed, path does not exist or is not accessible by Sonarr: /data/Seedbox_Torrents/The.No.1.Ladies.Detective.Agency.S01.1080p.AMZN.WEB-DL.DDP5.1.H.264-RCVR
20-5-27 16:05:18.5|Info|RssSyncService|Starting RSS Sync
20-5-27 16:05:20.1|Info|DownloadDecisionMaker|Processing 100 releases
20-5-27 16:05:21.5|Info|RssSyncService|RSS Sync Completed. Reports found: 100, Reports grabbed: 0
20-5-27 16:20:22.0|Info|RssSyncService|Starting RSS Sync
20-5-27 16:20:24.3|Info|DownloadDecisionMaker|Processing 100 releases
20-5-27 16:20:25.6|Info|RssSyncService|RSS Sync Completed. Reports found: 100, Reports grabbed: 0
20-5-27 16:35:26.3|Info|RssSyncService|Starting RSS Sync
20-5-27 16:35:27.8|Info|DownloadDecisionMaker|Processing 100 releases
20-5-27 16:35:29.1|Info|RssSyncService|RSS Sync Completed. Reports found: 100, Reports grabbed: 0
20-5-27 16:50:31.1|Info|RssSyncService|Starting RSS Sync
20-5-27 16:50:33.4|Info|DownloadDecisionMaker|Processing 100 releases
20-5-27 16:50:34.8|Info|RssSyncService|RSS Sync Completed. Reports found: 100, Reports grabbed: 0, Reports pending: 1
20-5-27 17:05:36.1|Info|RssSyncService|Starting RSS Sync
20-5-27 17:05:38.5|Info|DownloadDecisionMaker|Processing 101 releases
20-5-27 17:05:39.9|Info|RssSyncService|RSS Sync Completed. Reports found: 101, Reports grabbed: 0, Reports pending: 2
20-5-27 17:20:41.9|Info|RssSyncService|Starting RSS Sync
20-5-27 17:20:44.4|Info|DownloadDecisionMaker|Processing 101 releases
20-5-27 17:20:45.9|Info|RssSyncService|RSS Sync Completed. Reports found: 101, Reports grabbed: 0, Reports pending: 2
20-5-27 17:35:47.5|Info|RssSyncService|Starting RSS Sync
20-5-27 17:35:48.9|Info|DownloadDecisionMaker|Processing 101 releases
20-5-27 17:35:50.4|Info|RssSyncService|RSS Sync Completed. Reports found: 101, Reports grabbed: 0, Reports pending: 2
20-5-27 17:38:19.1|Info|SceneMappingService|Updating Scene mappings
20-5-27 17:50:53.3|Info|RssSyncService|Starting RSS Sync
20-5-27 17:50:55.0|Info|DownloadDecisionMaker|Processing 101 releases
20-5-27 17:50:56.6|Info|RssSyncService|RSS Sync Completed. Reports found: 101, Reports grabbed: 0, Reports pending: 2
20-5-27 18:05:58.2|Info|RssSyncService|Starting RSS Sync
20-5-27 18:05:59.8|Info|DownloadDecisionMaker|Processing 101 releases
20-5-27 18:06:01.5|Info|RssSyncService|RSS Sync Completed. Reports found: 101, Reports grabbed: 0, Reports pending: 2
20-5-27 18:21:04.6|Info|RssSyncService|Starting RSS Sync
20-5-27 18:21:06.8|Info|DownloadDecisionMaker|Processing 101 releases
20-5-27 18:21:08.3|Info|RssSyncService|RSS Sync Completed. Reports found: 101, Reports grabbed: 0, Reports pending: 2
20-5-27 18:36:10.6|Info|RssSyncService|Starting RSS Sync
20-5-27 18:36:12.2|Info|DownloadDecisionMaker|Processing 101 releases
20-5-27 18:36:13.7|Info|RssSyncService|RSS Sync Completed. Reports found: 101, Reports grabbed: 0, Reports pending: 2
20-5-27 18:47:41.1|Info|SceneMappingService|Updating Scene mappings
20-5-27 18:47:44.7|Info|RefreshSeriesService|Updating Info for The No. 1 Ladies Detective Agency
20-5-27 18:47:48.1|Info|RefreshEpisodeService|Starting episode info refresh for: [81606][The No. 1 Ladies Detective Agency]
20-5-27 18:47:48.2|Info|RefreshEpisodeService|Finished episode refresh for series: [81606][The No. 1 Ladies Detective Agency].
20-5-27 18:47:48.2|Info|DiskScanService|Scanning disk for The No. 1 Ladies Detective Agency
20-5-27 18:47:48.2|Info|DiskScanService|Completed scanning disk for The No. 1 Ladies Detective Agency
20-5-27 18:47:48.3|Info|ExistingMetadataImporter|Found 0 existing metadata files
20-5-27 18:47:48.3|Info|ExistingSubtitleImporter|Found 0 existing subtitle files
20-5-27 18:47:48.3|Info|ExistingOtherExtraImporter|Found 0 existing other extra files
20-5-27 18:47:48.3|Info|ExistingExtraFileService|Found 0 extra files
20-5-27 18:51:14.8|Info|RssSyncService|Starting RSS Sync
20-5-27 18:51:19.1|Info|DownloadDecisionMaker|Processing 101 releases
20-5-27 18:51:20.6|Info|RssSyncService|RSS Sync Completed. Reports found: 101, Reports grabbed: 0, Reports pending: 2

Edit. Saw a problem with one other episode…although not sure if this is related to the permission problem I had

0-5-24 11:41:32.0|Info|RssSyncService|RSS Sync Completed. Reports found: 100, Reports grabbed: 0
20-5-24 11:41:49.6|Info|NzbSearchService|Searching 1 indexers for [Penny Dreadful: City of Angels : S01]
20-5-24 11:41:50.1|Info|DownloadDecisionMaker|Processing 5 releases
20-5-24 11:41:50.3|Info|SeasonSearchService|Season search completed. 0 reports downloaded.
20-5-24 11:41:55.6|Info|NzbSearchService|Searching 1 indexers for [Penny Dreadful: City of Angels : S01E05]
20-5-24 11:41:56.0|Info|DownloadDecisionMaker|Processing 1 releases
20-5-24 11:41:56.0|Info|EpisodeSearchService|Episode search completed. 0 reports downloaded.
20-5-24 11:42:11.1|Info|NzbSearchService|Searching 1 indexers for [Penny Dreadful: City of Angels : S01E05]
20-5-24 11:42:12.1|Info|DownloadDecisionMaker|Processing 1 releases
20-5-24 11:43:48.2|Info|NzbSearchService|Searching 1 indexers for [Penny Dreadful: City of Angels : S01]
20-5-24 11:43:48.8|Info|DownloadDecisionMaker|Processing 5 releases
20-5-24 11:43:48.9|Info|SeasonSearchService|Season search completed. 0 reports downloaded.
20-5-24 11:43:59.6|Info|NzbSearchService|Searching 1 indexers for [Penny Dreadful: City of Angels : S01E05]
20-5-24 11:44:00.5|Info|DownloadDecisionMaker|Processing 1 releases
20-5-24 11:46:17.8|Info|NzbSearchService|Searching 1 indexers for [Penny Dreadful: City of Angels : S01E05]
20-5-24 11:46:20.0|Info|DownloadDecisionMaker|Processing 1 releases
20-5-24 11:46:23.0|Info|DownloadService|Report sent to seedbox. Penny Dreadful: City of Angels S01E05 1080p AMZN WEB-DL DD+ 5.1 H.264-NTG
20-5-24 11:46:23.2|Info|EpisodeSearchService|Episode search completed. 1 reports downloaded.
20-5-24 11:50:49.1|Error|DownloadedEpisodesImportService|Import failed, path does not exist or is not accessible by Sonarr: /data/Seedbox_Torrents/Penny.Dreadful.City.of.Angels.S01E05.Children.of.the.Royal.Sun.1080p.AMZN.WEB-DL.DDP5.1.H.264-NTG.mkv
20-5-24 11:52:19.6|Error|DownloadedEpisodesImportService|Import failed, path does not exist or is not accessible by Sonarr: /data/Seedbox_Torrents/Penny.Dreadful.City.of.Angels.S01E05.Children.of.the.Royal.Sun.1080p.AMZN.WEB-DL.DDP5.1.H.264-NTG.mkv
20-5-24 11:54:12.2|Warn|MediaFileAttributeService|Unable to apply permissions to: /tv/Penny Dreadful City of Angels/Season 1/Penny Dreadful City of Angels - S01E05 - Children of the Royal Sun.mkv

[v2.0.0.5344] NzbDrone.Mono.Disk.LinuxPermissionsException: Error setting file owner and/or group: EPERM
  at NzbDrone.Mono.Disk.DiskProvider.SetOwner (System.String path, System.String user, System.String group) [0x00057] in C:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Mono\Disk\DiskProvider.cs:223 
  at NzbDrone.Mono.Disk.DiskProvider.SetPermissions (System.String path, System.String mask, System.String user, System.String group) [0x00008] in C:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Mono\Disk\DiskProvider.cs:75 
  at NzbDrone.Core.MediaFiles.MediaFileAttributeService.SetMonoPermissions (System.String path, System.String permissions) [0x0000f] in C:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Core\MediaFiles\MediaFileAttributeService.cs:88 

20-5-24 11:56:50.3|Info|RssSyncService|Starting RSS Sync
20-5-24 11:56:51.7|Info|DownloadDecisionMaker|Processing 100 releases

On other question. How do I get Sonarr to now recognice the files in the synced folder so it can copy them over to it’s final destination? I tried go to the series and clicked on update and scan disk…but it doesn’t pick up the episodes. Is the only way to now manually copy them over?

Edit: Just to see what’s going on I removed the show and deleted all files from deluge and my local server and enabled debug under General Settings, then set Sonarr to grab it again. SHould give something better in the logs

It’s all in the template, you also need to enable debug logging.

Additional Information:
- Information on the log files is here: https://github.com/Sonarr/Sonarr/wiki/Log-Files
- Make sure debug logging is enabled in settings
- Post the log file, not a line or two, or just the error from the Logs table
- Post the full log to hastebin/pastebin/dropbox/google drive or something similar and link it here
- Do not post them directly here. Post in .txt not .doc, .rtf or some other formatted document

This is something debug logs will show.

Permissions are still set in Sonarr?

If they’re not in the series folder yet, use Manual Import from Wanted: Missing.

Here’s the files
Debug https://drive.google.com/file/d/1-_EzAtg14YakJpmWpKeEYjyrifG_IEu4/view?usp=sharing
log - https://drive.google.com/file/d/1wxZspLX-4xQBHIrQLAffKj1PsGaZ229p/view?usp=sharing

Not sure it will show anything now. I deleted the series, deleted anything on my drive. Removed the download from deluge and from the synched folder. Added the series back and it passed the series to deluge which downloaded it. Syncthing synched to my local folder and it just stopped there. Sonarr didn’t even try to import.

Which download/files am I looking for in the log?

Does it show up in Activity: Queue? Since you removed the series it should (as long as Sonarr parsed it).

If you’re using Syncthing you need to make sure Sonarr doesn’t see any file to import for a season pack before they’re all synced, if it does then it’ll import what’s there and mark the download as complete (ignoring any files that show up later), it can also import partial files if the extension isn’t changed. In v3 this is improved, but the if it’s a media file Sonarr will try to import it.

How do I get Sonarr to wait for all episodes to be synced before trying to copy?

Sync to a temp folder sonarr can’t see, then move the files to the folder sonarr expects, on the same volume so the move is instant.

1 Like

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