Permissions for SABnzbd 3.3.1-49 on DSM7

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
houndtt
Newbie
Newbie
Posts: 4
Joined: September 6th, 2021, 9:45 pm

Permissions for SABnzbd 3.3.1-49 on DSM7

Post by houndtt »

I recently installed the DSM7 compatible version of SABnzbd however testing a download in Lidarr (20210322-7) I got the following error:

Code: Select all

Couldn't import track /volume1/downloads/complete/Music/Imagine.Dragons-Origins.2018.MP3-AsmoFuscated/Imagine Dragons - Origins - 15 - Real Life.mp3: Access to the path '/volume1/downloads/complete/Music/Imagine.Dragons-Origins.2018.MP3-AsmoFuscated/Imagine Dragons - Origins - 15 - Real Life.mp3' is denied.
Now previously under DSM6 imports with Lidarr worked fine and in this instance the mp3 file did copy across correctly but the original in the download folder remained. I suspect it failed trying to delete the original after the copy operation. Now I tried adding 'sc-lidarr' with read/write access to the download folder (per the permissions instruction at the wiki page for permission management) but this did not fix the issue.

I then examined the permissions on the folder that was downloaded by SABnzbd and it was set to the owner 'sc-sabnzbd' and the folder did not inherit permissions from the higher level folder so the permission for 'sc-lidarr' didn't propagate. Looking back I see that both the download folder and the media folder had a group 'sc-download' with read/write access to both folders and this is what I suspect facilitated the correct functioning of Lidarr. Unfortunately, the group for the new files downloaded by SABnzbd under DSM7 is not this group anymore.

Any advice of how I should setup SABnzbd so the permissions for media management with Lidarr work correctly?

Junkt0wn
Newbie
Newbie
Posts: 5
Joined: September 5th, 2021, 10:03 pm

Re: Permissions for SABnzbd 3.3.1-49 on DSM7

Post by Junkt0wn »

Hi Houndtt,

I had run into this as well just today.

You'll need to delete or move that folder to somewhere else, and let SABnzdb create a new folder (ideally with the same name)

I then had to give sc-download read/write so that my other apps could use it (like Download Station/Radarr/Sonarr)

houndtt
Newbie
Newbie
Posts: 4
Joined: September 6th, 2021, 9:45 pm

Re: Permissions for SABnzbd 3.3.1-49 on DSM7

Post by houndtt »

Hey, thanks for the feedback. I'm not sure that is the solution. I tried the same thing with a sample movie in Radarr (20210708-15) and got a similar error:

Code: Select all

Couldn't import movie /volume1/downloads/complete/Movies/No_Time_to_Die_1958_DVDRip_XviD/4d53ff5fbe6a5c2989615ccbc0d9f021.avi: Access to the path '/volume1/downloads/complete/Movies/No_Time_to_Die_1958_DVDRip_XviD/4d53ff5fbe6a5c2989615ccbc0d9f021.avi' is denied.
Now when I examine the parent folder the permissions seem good:

Code: Select all

ls -ld /volume1/downloads/complete/Movies/
drwxrwxrwx+ 1 sc-sabnzbd sabnzbd 92 Sep  6 23:22 /volume1/downloads/complete/Movies/

synoacltool -get /volume1/downloads/complete/Movies/
ACL version: 1 
Archive: is_inherit,is_support_ACL 
Owner: [sc-sabnzbd(user)] 
--------------------- 
	 [0] user:sc-sabnzbd:allow:rwxpdDaARWc--:fd-- (level:2)
	 [1] group:sc-download:allow:rwxpdDaARWc--:fd-- (level:2)
	 [2] group:administrators:allow:rwxpdDaARWc--:fd-- (level:2)
	 [3] user:sc-transmission:allow:rwxpdDaARWc--:fd-- (level:2)
However when I compare this to the folder that SABnzbd created on successfully completing the download I see these permissions:

Code: Select all

ls -ld /volume1/downloads/complete/Movies/No_Time_to_Die_1958_DVDRip_XviD/
drwxr-xr-x 1 sc-sabnzbd sabnzbd 72 Sep  6 23:17 /volume1/downloads/complete/Movies/No_Time_to_Die_1958_DVDRip_XviD/

synoacltool -get /volume1/downloads/complete/Movies/No_Time_to_Die_1958_DVDRip_XviD/
(synoacltool.c, 489)It's Linux mode
In this second set of permissions you can see that the file is able to be read because of the read-only permission assigned to everyone but it can't be cleaned up by Radarr without the write permission. Is there a way to change the group that SABnzbd assigns to newly completed downloads?

houndtt
Newbie
Newbie
Posts: 4
Joined: September 6th, 2021, 9:45 pm

Re: Permissions for SABnzbd 3.3.1-49 on DSM7

Post by houndtt »

I took another look at the permissions and I found a workaround. Setting the Permissions for completed downloads to '777' allowed the downloads to complete and for Lidarr to pick up the files and manage the sorting and deletion.

If anyone needs to use this workaround the configuration is at Config > Folders and check the Advanced Settings box.

User avatar
safihre
Administrator
Administrator
Posts: 4470
Joined: April 30th, 2015, 7:35 am
Contact:

Re: Permissions for SABnzbd 3.3.1-49 on DSM7

Post by safihre »

Just as a remark: the 777 setting is the default setting or new installations of the DSM package.
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate

houndtt
Newbie
Newbie
Posts: 4
Joined: September 6th, 2021, 9:45 pm

Re: Permissions for SABnzbd 3.3.1-49 on DSM7

Post by houndtt »

safihre wrote:
September 7th, 2021, 6:09 am
Just as a remark: the 777 setting is the default setting or new installations of the DSM package.
Hey @safihre, thanks for jumping in on this conversation. I did a few more tests in a virtual DSM and could not replicate this. By default the new installation of SABnzbd 3.3.1-49 has no default setting in the config file and the following screenshot (both show below):

Code: Select all

sudo cat /volume1/@appdata/sabnzbd/config.ini
__version__ = 19
__encoding__ = utf-8
[misc]
permissions = ""
auto_browser = 0
host = 0.0.0.0
port = 8080
nice = -n15
ionice = -c2 -n4
download_dir = /volume1/downloads/incomplete
complete_dir = /volume1/downloads/complete
dirscan_dir = /volume1/downloads/watch
script_dir = /volume1/@appdata/sabnzbd/scripts
pre_script = None
[---snip---]
Image

I have to manually change it to '777' at which point Lidarr is able to successfully delete the downloaded files after they are processed. In fact, even with '777' set, the extracted folder does not have the full '777' permission since the properties look like this:

Image

With this configuration, the files are successfully deleted by Lidarr but the parent folder is not removed because 'Delete' is missing. To workaround this, I added Lidarr with full read/write access at the grandparent level for folder permissions that look like this:

Image

I don't know if this can be reviewed by the team but if correct, we should update the documentation for DSM7 here: https://github.com/SynoCommunity/spksrc ... Management

User avatar
safihre
Administrator
Administrator
Posts: 4470
Joined: April 30th, 2015, 7:35 am
Contact:

Re: Permissions for SABnzbd 3.3.1-49 on DSM7

Post by safihre »

If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate

lordabdul
Newbie
Newbie
Posts: 1
Joined: October 22nd, 2021, 11:31 pm

Re: Permissions for SABnzbd 3.3.1-49 on DSM7

Post by lordabdul »

Hey here, I ran into that same issue this week after upgrading to DSM7 and installing a fresh SABnzbd package (I didn't have it install prior to the upgrade). Sonarr/Radarr/Lidarr/etc were all having permissions issues and were therefore unable to move and rename the downloaded files. Setting SABnzbd's "complete" directory permissions to 777 manually in the options solved it, so I guess either the SynoCommunity package is not up to date, or there's some other package installation issue.

Post Reply