Synology DSM7 SC-Sabnzbd ownership of unpacked files

Report & discuss bugs found in 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
dw03
Newbie
Newbie
Posts: 7
Joined: April 12th, 2019, 6:58 pm

Synology DSM7 SC-Sabnzbd ownership of unpacked files

Post by dw03 »

It seems that a new update to DSM (DSM7.1.1-42692 update 1) and/or SAB has caused any media folder/files which are sorted and post-processed with SAB are now owned by "sc-sabnzbd" DSM user instead of the DSM admin account. This causes all kinds of permission issues with my media player and I have to go in and manually change the ownership back to my DSM admin account. Is there a way to make sure any new folders/files SAB creates are owned by the DSM admin account?
User avatar
safihre
Administrator
Administrator
Posts: 5338
Joined: April 30th, 2015, 7:35 am
Contact:

Re: Synology DSM7 SC-Sabnzbd ownership of unpacked files

Post by safihre »

No, this is the change made by Synology in DSM 7.
They made it on purpose like this.

You will have to add all users (applications) that you want to share files between to the same group.
Then, make sure that Permissions in SABnzbd Folder settings is left empty.
Any new job folders created by SABnzbd will then inherit the permissions from the parent Complete folder, so use that to set the right permissions you want.
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
dw03
Newbie
Newbie
Posts: 7
Joined: April 12th, 2019, 6:58 pm

Re: Synology DSM7 SC-Sabnzbd ownership of unpacked files

Post by dw03 »

Thanks for your prompt response. Can you help me figure out how do add all user (applications) to a group? I went to "Control Panel --> User & Group --> Group --> Create" and I cannot find a way to create a group for user (applications) it will only allow me to create a group for the list of "users" found in the first tab under "User & Group."

One other strange part is the owner is "sc-sabnzbd" after the post processing like I mentioned, however, once I change the owner to my proper admin account, I cannot change the owner back to "sc-sabnzbd." Instead I only have the list of "users" but no users (applications). This seems like a bug that was introduced with the latest DSM update. I never had this issue while running DSM7 for 6+ months.
dw03
Newbie
Newbie
Posts: 7
Joined: April 12th, 2019, 6:58 pm

Re: Synology DSM7 SC-Sabnzbd ownership of unpacked files

Post by dw03 »

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

Re: Synology DSM7 SC-Sabnzbd ownership of unpacked files

Post by safihre »

I'm no expert, it's better to ask at SynoCommunity I think.
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
dw03
Newbie
Newbie
Posts: 7
Joined: April 12th, 2019, 6:58 pm

Re: Synology DSM7 SC-Sabnzbd ownership of unpacked files

Post by dw03 »

FYI I spoke with the SynoCommunity group and they said

Code: Select all

This may be related to the file permissions set by SABnzbd on upgrade. They are usually set to 777 but somehow always get removed as of late. Try going into Settings > Folders > [Advanced Settings] > Permissions for completed downloads
This seems to have fixed the issue. Is this a bug with SAB not setting 777 properly anymore?
User avatar
safihre
Administrator
Administrator
Posts: 5338
Joined: April 30th, 2015, 7:35 am
Contact:

Re: Synology DSM7 SC-Sabnzbd ownership of unpacked files

Post by safihre »

No, that advice is wrong.
Where did they write that?
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
SABfaninAus
Newbie
Newbie
Posts: 19
Joined: October 23rd, 2017, 9:08 am

Re: Synology DSM7 SC-Sabnzbd ownership of unpacked files

Post by SABfaninAus »

Hi there,

I recently upgraded from DSM6 to DSM7 and I'm having this exact issue.

Files downloaded by SABnzbd on the NAS are copied/played from a shared folder, mounted by SMB (or AFP) on macOS. The user who mounts the share does not have admin privileges on the NAS, which is how I want it as this user is only for media playback, not for making any changes or deleting files.

With DSM6, I had no permissions issues with this set-up ever.

With DSM7, files downloaded by SABnzbd cannot be accessed on the share by the non-admin user. This means I can't copy or view the files unless I mount the share using a user with admin privileges on the NAS.

What's the easiest way to fix it so files downloaded by SABnzbd in DSM7 work like DSM6?

Checking my permissions, both the "complete" and "incomplete" folders being used by SABnzbd have the following permissions:

sc-download - Read & Write
administrators - Read & Write
Non-admin user who mounts the share - Read only

Files and folders created by SABnzbd in DSM6 correctly inherited these permissions.

However, files downloaded by SABnzbd with DSM7 end up with the following permissions only:

sc-sabnzbd - Custom (most Read & Write options shown in the permissions inspector)
sabnzbd - Custom (most Read & Write options shown in the permissions inspector)

They do NOT inherit the permissions of the parent complete/incomplete folder.

I appreciate any simple guidance you can provide!

SABfaninAus

PS: I posted some further experiences on the differences between SABnzbd on DSM6 and DSM7 for those interested here:
viewtopic.php?p=128795&sid=d657b4e2a03f ... 40#p128795
SABfaninAus
Newbie
Newbie
Posts: 19
Joined: October 23rd, 2017, 9:08 am

Re: Synology DSM7 SC-Sabnzbd ownership of unpacked files

Post by SABfaninAus »

I did some further investigation of this permissions issue which will hopefully help with identifying the cause.

For example, take a typical nzb file which contains of the following:

* nfo file
* nzb file
* multiple parts of a single rar file -> expands into an mkv file
* par files

On successful completion of the download and quick-repair, the following items have (for me) usable permissions:

* folder created to contain the download files
* nfo file
* nzb file

The mkv file created by unpacking the rar does NOT have (for me) correct permissions and it is not readable by non-admin users.

Is this expected behaviour?

I would have expected that all files created by the SABnzbd processes, whether simply downloaded like an nfo file or created by unpacking a multi-part RAR file, would end up with the same permissions.

As you can see from the full details below, additional permissions are given to the nfo file which are not given to the mkv file, which makes it inaccessible to non-admin users.

Thanks for reading and for your guidance.

SABfaninAus

______


Full owner/permissions details for all files (as reported by File Station):

* Folder created to contain the downloaded files from a single job
Owner: sc-sabnzbd
Permissions:
sc-download - Read & Write
Administrators - Read & Write
Non-admin user who mounts the share - Read only
(these appear to be inherited from the parent "incomplete" and "complete" folders)

* nfo file, nzb file
Owner: sc-sabnzbd
Permissions:
sc-sabnzbd - Read & Write
sabnzbd - Read & Write
Everyone - Read & Write

* mkv file generated by SABnzbd when unpacking a multi-part rar
Owner: sc-sabnzbd
Permissions:
sc-sabnzbd - Read & Write
(no other permissions are set for this file - why?)
User avatar
safihre
Administrator
Administrator
Posts: 5338
Joined: April 30th, 2015, 7:35 am
Contact:

Re: Synology DSM7 SC-Sabnzbd ownership of unpacked files

Post by safihre »

There will be an update that sort of helps for this in 3.7.2.
Are you using the SynoCommunity package or a Docker?
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
SABfaninAus
Newbie
Newbie
Posts: 19
Joined: October 23rd, 2017, 9:08 am

Re: Synology DSM7 SC-Sabnzbd ownership of unpacked files

Post by SABfaninAus »

Thanks for the great news that this is being looked at in the next version!

I'm using the SynoCommunity package.

Best,
SABfaninAus
SABfaninAus
Newbie
Newbie
Posts: 19
Joined: October 23rd, 2017, 9:08 am

Re: Synology DSM7 SC-Sabnzbd ownership of unpacked files

Post by SABfaninAus »

I'm delighted to let everyone know that this permissions issue was indeed fixed in 3.7.2.

My sincerest thanks to everyone who worked on this fix!

Cheers,
SABfaninAus
Post Reply