Jump to content

Files created by Emby are owned by root


pvoveris

Recommended Posts

pvoveris

Is there a way to configure Emby to create it's files to be owned by someone other than root?

 

I recently installed Emby on my NAS and every time it adds files they are owned by root, which cause some problems when trying to open them.

 

Emby Server version 4.2.1.0

QNAP firmware 4.3.6.0993

 

Kind Regards,

Peter

Link to comment
Share on other sites

pvoveris

Sure, those files would be items such as Info, Subtitles, Posters.  Basically any metadata that Emby discovers about my media and creates and stores a file.

 

Peter

Link to comment
Share on other sites

alucryd

The server is started as root, so any file created by emby will belong to root. Even if they're owned by root, they should be mod 644 and be at least world-readable, could you check what mod those files are? There is no easy way to change the user on the qnap side. One thing you can already do though if the mod is something like 640 is set the sticky bit on your media folders, that way any file that emby creates will belong to the group of your user instead of root.

Link to comment
Share on other sites

pvoveris

Didn't seem to accomplish anything, this is the permissions of the files Emby creates in the media folders on the NAS.

 

drwxrwxrwx 3 pvoveris pvoveris      4096 Aug 15 09:23  ./
drwxrwxrwx 3 pvoveris pvoveris      4096 Aug 15 09:23  ../
 
-rw-rw---- 1 root     root         14535 Aug 15 09:23 'Pennyworth (2019) - S01E01 - Pilot-thumb.jpg'
 
-rw-rw---- 1 root     root         70812 Aug 15 09:23 'Pennyworth (2019) - S01E02 - The Landlord`s Daughter-thumb.jpg'
 
-rw-rw---- 1 root     root        106211 Aug 15 09:23 'Pennyworth (2019) - S01E03 - Martha Kane-thumb.jpg'
 
-rw-rw---- 1 root     root          1919 Aug 15 05:08 'Pennyworth - S01E04 - Lady Penelope.nfo'
-rw-rw---- 1 root     root         76275 Aug 15 09:23 'Pennyworth - S01E04 - Lady Penelope-thumb.jpg'
-rw-rwx--- 1 pvoveris pvoveris       427 Aug  9 15:53  season.nfo*
drwxrwxrwx 3 pvoveris pvoveris      4096 Jul 30 18:53 '.@__thumb'/
Link to comment
Share on other sites

alucryd

Sorry I did it again, I mean setgid, not sticky bit. You can do that recursively with:

find . -type d -exec chmod g+s {} +

Your directories should be rws on the second triplet after that.

Link to comment
Share on other sites

  • 2 weeks later...
pvoveris

It works, but sometimes gets out of sync, unsure why but eventually I will encounter items that do not have the correct permissions.

 

I just wrote a script that I run that recursively trolls the media directories and chown's the files to my ID and group.

 

Thanks for the help.

 

Peter

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...