Page 1 of 1

SABnzbd app cannot create directories, but can from shell [docker / portainer]

Posted: October 14th, 2022, 10:47 am
by pm317b
A bit confused as to what is going on. Moving SABnzbd from Dockers on Windows to Portainer on Linux. Everything was going smoothly but after getting SABnzbd up I get the following error for Intermediate and Completed folders:

PermissionError: [Errno 13] Permission denied
(tried posting full error but it keeps yelling at me for links)

Obvisously, I figured it was a permissions issue so I pulled up the shell for the container and have zero issues parsing the folders or making directories. Even if I make the directory for it, SABnzbd is yelling at me that it can't access it.

If I let it make the /config directory (local) it works fine. If I use the data directory this is where I have issues - but as mentioned only when the py file is trying to make the directory. I considered a chmod but was concerned this would just break on the next container pull as the environement would technically be different.

Any thoughts?


*** Fix Update***: After poking at this for a bit I am guessing the app wasn't correctly pulling the right Uid or Group ID. I moved the share I was trying to use to also be a mounted linux volume and had similar issues. Then I opened the mount under sudo -i and ran "chown -R 777" on the entire volume. After that, things worked like a charm. Certainly not the most secure way to do it, but it has no direct path to the internet and works for what I need it to do.

Re: SABnzbd app cannot create directories, but can from shell [docker / portainer]

Posted: October 14th, 2022, 10:51 am
by sander
You can post text on https://pastebin.com/ and then post the url here with spaces arounds the dots

Re: SABnzbd app cannot create directories, but can from shell [docker / portainer]

Posted: October 14th, 2022, 10:56 am
by pm317b
https://pastebin.com/Z9x8z4AM

EDIT by sander:

Code: Select all

Failed making (/data/Usenet/intermediate)
Traceback (most recent call last):
  File "/app/sabnzbd/sabnzbd/filesystem.py", line 719, in create_all_dirs
    os.mkdir(path_part_combined)
PermissionError: [Errno 13] Permission denied: '/data/Usenet/intermediate'

Re: SABnzbd app cannot create directories, but can from shell [docker / portainer]

Posted: October 14th, 2022, 11:50 am
by sander
OK. Now the other part: go into the container, and write to /data/Usenet/intermediate

Re: SABnzbd app cannot create directories, but can from shell [docker / portainer]

Posted: October 14th, 2022, 11:57 am
by pm317b
That works fine, but going into the container I am root.

I made the intermediate folder while in the console and now the error is "download_dir directory: /data/Usenet/intermediate error accessing".

Clearly a permissions issue, but inside the container and I am not sure what.

Posted as requested:
root@2cd341f8ace7:/#ls
app command data dev donate.txt etc incomplete-downloads lib mnt package root sbin sys usr
bin config defaults docker-mods downloads home init media opt proc run srv tmp var
root@2cd341f8ace7:/#cd data
root@2cd341f8ace7:/data#ls
Media Usenet docker torrents
root@2cd341f8ace7:/data#cd Usenet
root@2cd341f8ace7:/data/Usenet#ls
root@2cd341f8ace7:/data/Usenet#mkdir intermediate
root@2cd341f8ace7:/data/Usenet#ls
intermediate
root@2cd341f8ace7:/data/Usenet#

Re: SABnzbd app cannot create directories, but can from shell [docker / portainer]

Posted: October 14th, 2022, 12:01 pm
by sander
pm317b wrote: October 14th, 2022, 11:57 am That works fine, but going into the container I am root.
So post it.
And: a container has only root. So running SAB inside the container is run as root inside the container.