IrishFavor Posted November 28, 2019 Share Posted November 28, 2019 Im having issues with what i think to be permissions between 2 docker apps (NZBget, Sonarr). Docker containers: binhex-nzbget Settings: /data/mnt/cache/appdata/binhex-nzbget/data /config/mnt/cache/appdata/binhex-nzbget/config binhex-sonarr (Version 2.0.0.5338, Mono Version 5.20.1) Settings: /config/mnt/cache/appdata/binhex-sonarr/config /data/mnt/cache/appdata/binhex-sonarr/data/ /media/mnt/user/TV Shows/ When i add a show it is able to connect to NZBget to search and download a file, the file will successfully download and NZBget states that it unpacks the file. However Sonarr never picks up the file. It appears that he file is able to be seen however i get the following error. Import failed, path does not exist or is not accessible by Sonarr: /usr/local/bin/nzbget/downloads/completed/TV Shows/NAMEOFTVSHOW.S01E06.NAMEOFEPISODE.1080p..WEB-DL.DDP5.1.H.264-NTb I have tried both the Docker Safe New Permissions under settings as well as SSH into the server and applying permissions to the directory with: chmod -R 777 ./ None of which have resolved the issue, after which i wiped the configuration and re-imaged the flashdrive and started from scratch however the issue persists. Any assistance would be greatly appreciated. Quote Link to comment
elecgnosis Posted November 28, 2019 Share Posted November 28, 2019 (edited) I accidentally ran chmod 777 -R /mnt/user/ which changed all of the permissions on files in /mnt/user/appdata, causing all of my Docker containers to fail to start. I poked around the forum and found a script to fix these permissions. It appears to have worked. Here is the script and its contents: #!/bin/sh for dir in /mnt/user/appdata do echo $dir chown -cR nobody:users $dir chmod -cR ug+rw,ug+X,o-rwx $dir done I don't know if this will fix your original problem, but it should fix the 777 permissions issue. fixAppdataPerms.sh Edited November 28, 2019 by elecgnosis Quote Link to comment
elecgnosis Posted November 28, 2019 Share Posted November 28, 2019 I'm not familiar with NZBGet or Sonarr (I use SabNZBd), but to hazard a guess as to what the original problem was, it looks like you should map a common directory between NZBGet and Sonarr, setting it as the unpacking destination for NZBGet and some kind of input directory for Sonarr. From the message you posted it doesn't look like Sonarr has access to the directory NZBGet is putting its completed files in. Quote Link to comment
JonathanM Posted November 28, 2019 Share Posted November 28, 2019 8 hours ago, IrishFavor said: Im having issues with what i think to be permissions between 2 docker apps (NZBget, Sonarr). It's not permissions, it's incorrect paths. Read this carefully. https://forums.unraid.net/topic/57181-docker-faq/?do=findComment&comment=564306 1 Quote Link to comment
IrishFavor Posted November 28, 2019 Author Share Posted November 28, 2019 Thanks all for the reply, ok so i understand that i need to have a common path for the 2 apps. I have tried mapping sonarr to the download location and i get the same thing it will see the files and can initiate a download however it does not move the files or rename files etc. I have even created a separate share to test on one of the disks in the array instead of the cache drive. I have also tried restoring permissions via the script above. As of now the config for both apps are as follows: NZBget: /data/mnt/user/Downloads/ /config/mnt/cache/appdata/binhex-nzbget/config Sonarr: /data/mnt/user/Downloads/ /media/mnt/user/TV Shows/ /config/mnt/cache/appdata/binhex-sonarr/config Quote Link to comment
IrishFavor Posted November 28, 2019 Author Share Posted November 28, 2019 UMASK is set to 1000 Quote Link to comment
BRiT Posted November 28, 2019 Share Posted November 28, 2019 You have umask setting disabled in nzbget so it uses whatever is set in that particular shell, and I don't know what Docker system or that particular container uses. I don't use RADAR/SONAR etc, but my downloads come out with User of nobody and Group of users and I think the permissions are typically 666 with the following values: nzbget docker config has PUID = 99 (nobody) and GUID = 100 (users). nzbget app config has umask set to '000'. From nzbget umask setting description: Quote UMask determines the settings of a mask that controls how file permissions are set for newly created files and directories. Please note that UMask doesn't set file permissions directly, it merely filters out certain permissions. It also has very different effect from command "chmod", which you shouldn't confuse UMask with. Please read http://en.wikipedia.org/wiki/Umask for details. The value should be written in octal form (the same as for "umask" shell command). Empty value or value "1000" disables the setting of umask-mode; current umask-mode (set via shell) is used in this case. Quote Link to comment
BRiT Posted November 28, 2019 Share Posted November 28, 2019 Also to clarify since you didn't have any spaces between variable name and value, these are your path settings? (I had to assume the topmost level was the variable name and anything after level 2 was the value) NZBget: /data = /mnt/user/Downloads/ /config = /mnt/cache/appdata/binhex-nzbget/config Sonarr: /data = /mnt/user/Downloads/ /media = /mnt/user/TV Shows/ /config = /mnt/cache/appdata/binhex-sonarr/config ------------------- For reference my nzbget uses the following (may be slightly different than others as I had a working config going back years and didn't want to change it), but your /data is equivalent to my /downloads : /downloads = /mnt/cache/downloads /config = /mnt/cache/appdata/nzbget Quote Link to comment
IrishFavor Posted November 28, 2019 Author Share Posted November 28, 2019 That is correct it should be: NZBget: /data = /mnt/user/Downloads/ /config = /mnt/cache/appdata/binhex-nzbget/config Sonarr: /data = /mnt/user/Downloads/ /media = /mnt/user/TV Shows/ /config = /mnt/cache/appdata/binhex-sonarr/config If i understand correctly tho if UMASK is set to 1000 it will not use that feature so it shouldn't filter anything out correct? Quote Link to comment
IrishFavor Posted November 28, 2019 Author Share Posted November 28, 2019 I am using all Binhex containers so i would imagine they are all set with similar settings? And for the paths in the NZBget when it says ${AppDir} that should refer the the \Data Location = /mnt/user/Downloads/ So in that location you should see /mnt/user/Downloads/downloads/completed and /mnt/user/Downloads/downloads/intermediate ${MainDir} should refer to the previous location of /mnt/user/Downloads/downloads So my understanding is if i have no UMASK set and my Data = /mnt/user/Downloads in Sonarr then it should be able to locate the files and move them? Quote Link to comment
BRiT Posted November 28, 2019 Share Posted November 28, 2019 It's still filtering things out, just not using what YOU specify. It's using what the shell/process/docker is specifying. That could be 077 as far as we know. Try using UMASK 000 and see if it helps. It certainly can't break what's already broken. 😎 Quote Link to comment
IrishFavor Posted November 28, 2019 Author Share Posted November 28, 2019 Ok, ill try 000. now i did look at Sonarr and did not see an option for UMASK is this something i would need to SSH into the container and set? Quote Link to comment
BRiT Posted November 28, 2019 Share Posted November 28, 2019 (edited) If that doesn't work, set MainDir to be "/data" or "/data/downloads" inside of nzbget config, depending on how you want it structured. That way there's no questions as to what ${AppDir} actually is. Also, UMASK is typically only used for writing of NEW files. Edited November 28, 2019 by BRiT Quote Link to comment
IrishFavor Posted November 28, 2019 Author Share Posted November 28, 2019 Ok, just tried downloading with UMASK set to 000 and NZBget: /data = /mnt/user/Downloads/ /config = /mnt/cache/appdata/binhex-nzbget/config Sonarr: /data = /mnt/user/Downloads/ /media = /mnt/user/TV Shows/ /config = /mnt/cache/appdata/binhex-sonarr/config with path set in ZNBget to ${MainDir}/downloads, that did not resolve the issue. I will now try with /Data set for the MainDir. Quote Link to comment
IrishFavor Posted November 28, 2019 Author Share Posted November 28, 2019 Testing with MainDir set to \Data appears to give this error: ERRORThu Nov 28 2019 12:43:09Could not create file /Data/tmp/nzb-20.tmp Now testing with \Data\downloads Quote Link to comment
IrishFavor Posted November 28, 2019 Author Share Posted November 28, 2019 Testing with MainDir set to \Data\downloads appears to give same error: ERRORThu Nov 28 2019 12:47:09Could not create file /Data/downloads/tmp/nzb-38.tmp Quote Link to comment
IrishFavor Posted November 28, 2019 Author Share Posted November 28, 2019 Setting MainDir back to ${MainDir}/downloads appears to allow downloading of files: INFOThu Nov 28 2019 12:51:30Successfully downloaded NAMEOFTVSHOW.S01E01.INTERNAL.1080p.WEB.H264-DEFLATE/dTPKvBPUY1j5F9.part02.rar Letting file finish with UMASK set to 000 to see if file will now import. Quote Link to comment
IrishFavor Posted November 28, 2019 Author Share Posted November 28, 2019 (edited) Confirmed that changing the MainDir back to ${MainDir}/downloads allows for the downloading of files however UMASK set to 000 does not appear to solve the issue with files being moved over. Sonarr Log: DownloadedEpisodesImportServiceImport failed, path does not exist or is not accessible by Sonarr: /home/nobody/downloads/downloadscompleted/TV Shows/NAMEOFTVSHOW.S01E03.1080p.WEB.H264-PETRIFIED1:06pm EpisodeSearchServiceEpisode search completed. 1 reports downloaded.12:54pm DownloadServiceReport sent to NZBget. NAMEOFTVSHOW.S01E03.1080p.WEB.H264-PETRIFIED12:54pm NzbgetAdding report [NAMEOFTVSHOW.S01E03.1080p.WEB.H264-PETRIFIED] to the queue.12:54pm DownloadDecisionMakerProcessing 6 releases12:54pm NzbSearchServiceSearching 1 indexers for [NAME OF TV SHOW: S01E03]12:54pm RssSyncServiceRSS Sync Completed. Reports found: 100, Reports grabbed: 012:51pm DownloadDecisionMakerProcessing 100 releases12:51pm RssSyncServiceStarting RSS Sync12:51pm EpisodeSearchServiceEpisode search completed. 1 reports downloaded.12:50pm It appears that changing the UMASK had no effect or the wrong setting was used? Edited November 28, 2019 by IrishFavor Quote Link to comment
Squid Posted November 28, 2019 Share Posted November 28, 2019 3 hours ago, IrishFavor said: DownloadedEpisodesImportServiceImport failed, path does not exist or is not accessible by Sonarr: /home/nobody/downloads/downloadscompleted/TV Shows/NAMEOFTVSHOW.S01E03.1080p.WEB.H264-PETRIFIED1:06pm This means that the main dir was still set to {$AppDir}. Main dir should be /data Quote Link to comment
JonathanM Posted November 28, 2019 Share Posted November 28, 2019 4 hours ago, IrishFavor said: NZBget: /data = /mnt/user/Downloads/ /config = /mnt/cache/appdata/binhex-nzbget/config Sonarr: /data = /mnt/user/Downloads/ /media = /mnt/user/TV Shows/ /config = /mnt/cache/appdata/binhex-sonarr/config with path set in ZNBget to ${MainDir}/downloads, that did not resolve the issue. I will now try with /Data set for the MainDir. /data is NOT the same as /Data The paths must match. Quote Link to comment
IrishFavor Posted November 29, 2019 Author Share Posted November 29, 2019 15 hours ago, Squid said: This means that the main dir was still set to {$AppDir}. Main dir should be /data 15 hours ago, jonathanm said: /data is NOT the same as /Data The paths must match. apologies yes i wrote /Data when i should have written /data when i changed the path within the settings from ${AppDir} to /data it would error out. however when i changed it back to ${AppDir} it appears that the downloads would initiate correctly. Quote Link to comment
Squid Posted November 29, 2019 Share Posted November 29, 2019 Very subtle, but you've got DestDir as ${MainDir}completed where is should be ${MainDir}/completed The way you've got it, its moving completed files into the docker.img, and will explain everything else (maybe) To fix this up, you're best off stopping the docker service (Settings), deleting the docker.img file, then re-adding the apps via Apps - Previous Apps Quote Link to comment
IrishFavor Posted November 29, 2019 Author Share Posted November 29, 2019 Aw crap i must have hit delete by accident while testing thanks for that catch, i don't think that was the issue i will update it and test. if that doesn't work as i have been changing settings perhaps a refresh from default is needed. I'll delete the apps and docker.img and try again. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.