Jump to content

Change Permissions or User/Group for New Recordings


Recommended Posts

Posted

I got Emby set up to put my recordings in /mnt/user/Recordings/Emby however I want to be able to write these files using my windows computer so I went to look up the permissions and user/group of these files and they default to

drwxr-x-r-x daemon daemon

Is there anyway to get this to be 

drwxrwxrwx nobody users

This will allow me to move/delete the files when I am done modifying them.

 

 

mastrmind11
Posted (edited)

I got Emby set up to put my recordings in /mnt/user/Recordings/Emby however I want to be able to write these files using my windows computer so I went to look up the permissions and user/group of these files and they default to

drwxr-x-r-x daemon daemon

Is there anyway to get this to be 

drwxrwxrwx nobody users

This will allow me to move/delete the files when I am done modifying them.

Neither of those persmissions look correct.  At the very least, emby should be the owner of the files it creates.  Regardless, if this truly is the permissions, just add your smb user to the same group that exists there now.  However, I would definitely look into these permissions at some point, they're definitely jacked up and I can't see how they're not causing issues right now.

Edited by mastrmind11
Posted

Neither of those persmissions look correct.  At the very least, emby should be the owner of the files it creates.  Regardless, if this truly is the permissions, just add your smb user to the same group that exists there now.  However, I would definitely look into these permissions at some point, they're definitely jacked up and I can't see how they're not causing issues right now.

 

I agree this didn't quite seem right to me either.  I am using unraid so I am using the docker image of emby.  I don't think that would matter but maybe it does.  I will try adding my user to the daemon group.

Posted

So I went ahead and added the user to the daemon group and that didn't seem to fix it.  I think part of the reason is that i don't have the write bit by default.  I looked through the list of groups and there was no emby group.  Not sure if that really matters but there wasn't one.  I think either way I have to somehow get the write bit enabled by default when the file is created.

mastrmind11
Posted

So I went ahead and added the user to the daemon group and that didn't seem to fix it. I think part of the reason is that i don't have the write bit by default. I looked through the list of groups and there was no emby group. Not sure if that really matters but there wasn't one. I think either way I have to somehow get the write bit enabled by default when the file is created.

You can do this by setting the mask at the folder level. Just Google 'linux setting permissions on file creation'.

 

Sent from my SM-G965U using Tapatalk

Posted

I have tried doing this using the following instructions:

 

https://www.linuxquestions.org/questions/linux-desktop-74/applying-default-permissions-for-newly-created-files-within-a-specific-folder-605129/

 

however my new file is given the following permissions

drwxr-sr-x+ nobody users

This if I remove the gid with 

chmod g-s

I will then get 

drwxr-sr-x+ nobody users

It seems to be that I still can't get the write bit on new files.

mastrmind11
Posted (edited)

I have tried doing this using the following instructions:

 

https://www.linuxquestions.org/questions/linux-desktop-74/applying-default-permissions-for-newly-created-files-within-a-specific-folder-605129/

 

however my new file is given the following permissions

drwxr-sr-x+ nobody users

This if I remove the gid with 

chmod g-s

I will then get 

drwxr-sr-x+ nobody users

It seems to be that I still can't get the write bit on new files.

Setting the gidbit will make all new files inherit the permissions of the folder's group.  So get your group permissions set the way you want them at the folder level, then set the gidbit.

 

edit:  I still think this is a hack since your permissions are screwed up.  The longer you go down this path, the more hosed you're going to be in the future.  I'm unfamiliar w/ unraid, but even so, something is wrong.  Carry on at your own risk, I guess.

Edited by mastrmind11
Posted

I have tried doing this using the following instructions:

 

https://www.linuxquestions.org/questions/linux-desktop-74/applying-default-permissions-for-newly-created-files-within-a-specific-folder-605129/

 

however my new file is given the following permissions

drwxr-sr-x+ nobody users

This if I remove the gid with 

chmod g-s

I will then get 

drwxr-sr-x+ nobody users

It seems to be that I still can't get the write bit on new files.

 

I just went ahead and used a different docker because it allows for umask in the docker image

Posted

the binhex-emby docker has the umask in it.  The official emby docker does not allow for this.  i am using Unraid.

Posted (edited)

You want to use setfacl, not chmod. Set the defaul ACL for the directory to add the specific users and groups you want to give permissions. New files and sub-directories will be created with the ACL and the permissions you want. This way you can add permissions for any user or group without the need for them to have any in common with the path owner.

 

For an existing library with files and directories you can do the following at the base dir:

 

setfacl -R -m d:u:<user>:rwx,d:g:<group>:rwx,d:mask:rwx <dir>

 

Each one is optional, you can set for one or more users and/or groups, even add other. Mask is a good idea to keep or some perms can be removed with a default umask.

 

For a single empty directory you don't need the -R (recursive) option.

 

I use ACLs for sonarr and radarr access to nzbget files and dirs. And for emby to access sonarr and radarr files and dirs.

Edited by Q-Droid
  • 3 months later...
Posted (edited)

So I am having a similar issue.

 

So using DVR I have a folder setup called dvr_holding where I have Emby DVR recordings going to before post processing externally using MCEbuddy to strip commercials, convert to MP4 and rename before moving to my media folder. Everything is working except deleting the folder and file once the MCEbuddy processing is done. So I have noticed that when a recording starts and write the new folder and file, the permissions is drwxr-xr-x 1 daemon daemon.

 

I would assume it does this during the write phase so you can't accidentally delete it while the show is being recorded but after that is complete, I would expect the permissions to change to nobody nobody and allow it to be deleted.. 

 

Can someone explain how this should work or if I am doing something wrong?

Edited by Mbppg
mastrmind11
Posted

just add your mcebuddy user to the daemon group.

Posted

Currently I have it getting there as Guest with no password (default). Thanks @mastermind11 I will give that a try.

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...