Page 1 of 1

Synology DSM7 SC-Sabnzbd ownership of unpacked files

Posted: October 16th, 2022, 10:11 am
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?

Re: Synology DSM7 SC-Sabnzbd ownership of unpacked files

Posted: October 16th, 2022, 10:39 am
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.

Re: Synology DSM7 SC-Sabnzbd ownership of unpacked files

Posted: October 17th, 2022, 10:31 am
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.

Re: Synology DSM7 SC-Sabnzbd ownership of unpacked files

Posted: October 26th, 2022, 8:05 am
by dw03
Bump

Re: Synology DSM7 SC-Sabnzbd ownership of unpacked files

Posted: October 26th, 2022, 12:04 pm
by safihre
I'm no expert, it's better to ask at SynoCommunity I think.

Re: Synology DSM7 SC-Sabnzbd ownership of unpacked files

Posted: December 31st, 2022, 4:39 pm
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?

Re: Synology DSM7 SC-Sabnzbd ownership of unpacked files

Posted: January 1st, 2023, 3:54 am
by safihre
No, that advice is wrong.
Where did they write that?

Re: Synology DSM7 SC-Sabnzbd ownership of unpacked files

Posted: January 13th, 2023, 11:29 am
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

Re: Synology DSM7 SC-Sabnzbd ownership of unpacked files

Posted: January 14th, 2023, 10:29 am
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?)

Re: Synology DSM7 SC-Sabnzbd ownership of unpacked files

Posted: January 14th, 2023, 11:51 am
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?

Re: Synology DSM7 SC-Sabnzbd ownership of unpacked files

Posted: January 14th, 2023, 12:02 pm
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

Re: Synology DSM7 SC-Sabnzbd ownership of unpacked files

Posted: March 1st, 2023, 10:04 am
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