Permission issues?


IrishFavor

23 posts in this topic Last Reply

Recommended Posts

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.

Link to post

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 by elecgnosis
Link to post

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.

Link to post

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

 

 

Link to post

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.

 

Link to post

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

 

image.png.6cc5b0e8c1598d27e58a5825f7971707.png

 

Link to post

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

 

image.png.cb45f644861d403013c09e21b221fd41.png

 

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?

Link to post

I am using all Binhex containers so i would imagine they are all set with similar settings?

 

image.png.e5145eab67b8d03a7be414769ce53f07.png

 

And for the paths in the NZBget when it says ${AppDir} that should refer the the \Data Location = /mnt/user/Downloads/

 

image.thumb.png.8cf7352e86bcc189d4a86688fe5bb46f.png

 

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?

Link to post

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. 😎

Link to post

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 by BRiT
Link to post

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.

Link to post

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.

Link to post

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

 

image.thumb.png.b4a067dda905edbcbdc174b3fadf3876.png

 

It appears that changing the UMASK had no effect or the wrong setting was used?

Edited by IrishFavor
Link to post
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 

 

 

 

 

Link to post
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.

Link to post
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. 

 

image.thumb.png.2d7ac5da308dcece78a98bcfd5173283.png

 

 

image.thumb.png.abfb5980e9067ad77d5207d217181a17.png

 

Link to post

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

Link to post

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.

Link to post

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.