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

Get help with all aspects of SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
pm317b
Newbie
Newbie
Posts: 5
Joined: October 14th, 2022, 10:34 am

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

Post 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.
Last edited by pm317b on October 18th, 2022, 8:47 am, edited 1 time in total.
User avatar
sander
Release Testers
Release Testers
Posts: 9429
Joined: January 22nd, 2008, 2:22 pm

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

Post by sander »

You can post text on https://pastebin.com/ and then post the url here with spaces arounds the dots
pm317b
Newbie
Newbie
Posts: 5
Joined: October 14th, 2022, 10:34 am

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

Post 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'
User avatar
sander
Release Testers
Release Testers
Posts: 9429
Joined: January 22nd, 2008, 2:22 pm

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

Post by sander »

OK. Now the other part: go into the container, and write to /data/Usenet/intermediate
pm317b
Newbie
Newbie
Posts: 5
Joined: October 14th, 2022, 10:34 am

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

Post 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#
Last edited by pm317b on October 14th, 2022, 12:04 pm, edited 2 times in total.
User avatar
sander
Release Testers
Release Testers
Posts: 9429
Joined: January 22nd, 2008, 2:22 pm

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

Post 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.
Post Reply