BenjV / SYNO-packages

43 stars 10 forks source link

Rights issues after installing sickchill using BenjV package on new Synology OS installation with existing series #23

Closed crzed1 closed 3 years ago

crzed1 commented 3 years ago

After installing sickchill using the "SickChill 1.0 Python 3 noarch.spk" package I ended up with a working installation (yes!) which was unable to copy/move the files into the predefined file structure with existing Series.

This came apparent after I found out Sickchill did try to move the new episodes, couldn't due to rights issues, and nevertheless deleted the files from the source folder. After logging that bug at SickChill/SickChill, I investigated again today to solve the rights issue.

The problem seems to be related to the way the linux filesystem of Synology handles the rights structure. The (internal) user sc-sickchill was created by the installation package, the group sc-download as well. But the old folder structure with existing series had a different owner.

I have been able to solve the issue by performing the following command from a ssh/telnet session to the Synology box:

chown -R sc-sickchill:sc-download /volume3/series (the last part shows my folder structure)

Using this command the owner of the filestructure was set to sc-sickchill and the sc-download group. After this the post processing worked smoothly again.

Maybe the installation package can add a step to ask the user for any existing series folders and perform this rights issue task for them?

(of course it might be that my solution is working, but not the preferred one - in which case I would like to be corrected)

BenjV commented 3 years ago

First of all don't use sc-sickchill for setting permissions, that is the internal name used by DSM and it is wise to leave that alone, the group sc-download is specific created for this purpose. You could simply give permissions to /volume3/series via the group sc-download as stated during installation.

Of course existing folders and files will not get this permission at the moment you set this permission, only new created folders and files. The default on Linux is that during creation time the folder and files get the permissions of the parent folder.

So if you have existing files and folders then you should use File Station to change the permission recursively for existing files and folders to give read/write permissions for the group sc-download. (select the folder /volume3/series, right mouseclick , select properties, choose permissions and don't forget to tick the box in the lower left corner)

And it not a good idea to do this during installation of the package because there is no default locations and also there could be multiple locations.

crzed1 commented 3 years ago

I actually tried the option to do this through FileStation but that didn't work out for me. Probably there was some other setting (folder ownership?) that prohibited the writing of files. Thanks very much for the reply and insights.