Cannot import Episode ... Access to Path is denied. RPI + cifs + NAS

Sonarr version (exact version): 2.0.0.4613
Mono version (if Sonarr is not running on Windows): 3.10.0
OS: Raspbian Jess Lite 2017-01-11
((Debug logs)): https://www.dropbox.com/s/4fhzp29y3qjxmfk/sonarr.debug.txt?dl=0
(Make sure debug logging is enabled in settings and post the full log to hastebin/pastebin/dropbox/google drive or something similar, do not post them directly here)
Description of issue: Episodes which have been successfully downloaded via sonarr - > nzbget cannot then be post processed due to permission errors.
Now I know this seems to be a very common mistake that people make, but I’ve been banging my head against this and I can’t seem to get it to work. I have just moved to using a raspberry pi to run Sonarr, as my NAS was underpowered (but it did work well on there).

My set up is as follows:

I have one NAS (synology) this runs:

  • NzbGet - under the user: nzbget, group: users - > sets Umask to 000 on created files
  • Shared Folders which contain all the Download folders, TV, Movie folders etc, rw access to users group

I have on Raspberry Pi this runs:

  • Sonarr under the user: pi, group: users
  • Radarr (having similar issues) under the user: pi, group: users

I have edited my /etc/fstab to automount three shared folders from the NAS:

//192.168.0.20/Movies  /home/pi/NAS/Movies  cifs  username=pi,password=<MYPASSWORD>,uid=pi,gid=users,file_mode=0777,dir_mode=0777,forceuid,forcegid  0  0
//192.168.0.20/TV  /home/pi/NAS/TV  cifs  username=pi,password=<MYPASSWORD>,uid=pi,gid=users,file_mode=0777,dir_mode=0777,forceuid,forcegid 0  0
//192.168.0.20/Downloads  /home/pi/NAS/Downloads  cifs  username=pi,password=<MYPASSWORD>,uid=pi,gid=users,file_mode=0777,dir_mode=0777,forceuid,forcegid  0  0

I’ve been assuming that the issue lies with this cifs mount, I am attempting to mount them as if they were under the user:pi group:users (as set up on the NAS)

SSHing into the rpi under the same user ‘pi’ and making files, moving files etc works. Additionally I have had a couple of episodes actually be downloaded and moved to the correct locations on the shared folder. So I feel it can’t be entirely the mounting.

Looking at the permissions from the pi side I see this:

pi@raspberrypi:~/NAS/Downloads/Complete/TV $ ls -al
total 7
drwxrwxrwx 8 pi users    0 Mar  7 12:00 .
drwxrwxrwx 6 pi users    0 Feb 26 01:05 ..
drwxrwxrwx 2 pi users    0 Mar  7 12:33 Bobs.Burgers.S07E11.720p.HDTV.x264-BRISK English
-rw-rw-rw- 1 pi users 6148 Mar  4 10:34 .DS_Store
drwxrwxrwx 2 pi users    0 Mar  7 12:33 Girls.S06E04.iNTERNAL.HDTV.x264-TURBO-Obfuscated
drwxrwxrwx 2 pi users    0 Mar  7 12:33 Its.Always.Sunny.in.Philadelphia.S12E08.HDTV.x264-SVA-Obfuscated
drwxrwxrwx 2 pi users    0 Mar  7 12:33 Taboo.2017.S01E07.720p.WEB-DL.DD5.1.H264-RARBG
drwxrwxrwx 2 pi users    0 Mar  7 12:33 The.Last.Man.On.Earth.S03E10.HDTV.x264-SVA
drwxrwxrwx 2 pi users    0 Mar  7 12:33 Workaholics.S07E07.WEB.x264-HEAT-Obfuscated

and from the NAS side:

Tom@NAS:/volume1/Downloads/Complete/TV$ ls -al
total 52
drwxrwxrwx 8 nzbget users 4096 Mar  7 12:00 .
drwxrwxrwx 6 nzbget users 4096 Feb 26 01:05 ..
drwxrwxrwx 2 nzbget users 4096 Mar  7 12:35 Bobs.Burgers.S07E11.720p.HDTV.x264-BRISK English
-rw-rw-rw- 1 nzbget users 6148 Mar  4 10:34 .DS_Store
drwxrwxrwx 2 nzbget users 4096 Mar  7 12:35 Girls.S06E04.iNTERNAL.HDTV.x264-TURBO-Obfuscated
drwxrwxrwx 2 nzbget users 4096 Mar  7 12:35 Its.Always.Sunny.in.Philadelphia.S12E08.HDTV.x264-SVA-Obfuscated
drwxrwxrwx 2 nzbget users 4096 Mar  7 12:35 Taboo.2017.S01E07.720p.WEB-DL.DD5.1.H264-RARBG
drwxrwxrwx 2 nzbget users 4096 Mar  7 12:35 The.Last.Man.On.Earth.S03E10.HDTV.x264-SVA
drwxrwxrwx 2 nzbget users 4096 Mar  7 12:35 Workaholics.S07E07.WEB.x264-HEAT-Obfuscated
Tom@NAS:/volume1/Downloads/Complete/TV$ 

The difference being it showing up as nzbget as the user on the NAS - I cannot change this as its run through the synology packages.

Additionally, running ps -aux on the rpi shows the relevant:

pi         596 55.1 12.7 170300 120536 ?       Sl   12:13  13:58 /usr/local/bin/mono Radarr.exe
pi         598 20.1 14.0 180352 133320 ?       Sl   12:13   5:05 /usr/local/bin/mono NzbDrone.exe

similarly on the NAS:

nzbget    7596  3.5 22.7 211352 56440 ?        Ssl  Feb23 596:11 /usr/local/nzbget/bin/nzbget -c /usr/local/nzbget/var/nzbget.conf -D

Any insight, or help would be great.

Thanks

Ok whilst moving some files around on the NAS I had some permissions issues. I chown -R pi:users to the TV folder on the NAS and now things seems to be moving across. I was under the assumption that the error message meant that it couldn’t access the file in the downloads folder.

Hopefully this fixes the issue :slight_smile:

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