Kodi_Newcomer 27 Posted December 18, 2024 Posted December 18, 2024 Hello Com, I hope im right here. How can i change something with user:group. I mean emby runs as user emby, but will that emby is in the group for my media folders. So how can i change this now, that it its emby:medieafolders ? The Problem is, that emby cant delet files and folders, because permissions error. Or what i can do that it works ? At the moment i go manual over terminal and chmod the folders time in time to change to 777 that emby can delet files and folders. Greet's Newcomer
kikinjo 281 Posted December 18, 2024 Posted December 18, 2024 Hey u need to set permissions like this on folders where your media is: sudo setfacl -m u:emby:rwx /home/user/media sudo setfacl -R -m u:emby:rwx /home/user/media sudo setfacl -R -d -m u:emby:rwx /home/user/media cheers 1
Kodi_Newcomer 27 Posted December 18, 2024 Author Posted December 18, 2024 42 minutes ago, kikinjo said: Hey u need to set permissions like this on folders where your media is: sudo setfacl -m u:emby:rwx /home/user/media sudo setfacl -R -m u:emby:rwx /home/user/media sudo setfacl -R -d -m u:emby:rwx /home/user/media cheers But what happens, when the other tool create a new folder, then i have to do this again ? I will do this like the other tools. Emby:Mediafolder. So Emby is in the group mediafolder and have read write access to the folders and files. So how can i set up emby that he is always in this group so i have not to do that manual again and again for new folders and files ?
kikinjo 281 Posted December 18, 2024 Posted December 18, 2024 This is the easiest way, for other tool you can add that tools user to emby group. Also look at the post that Luke posted, there is alot of information on this forum that will help. Cheers
Kodi_Newcomer 27 Posted December 18, 2024 Author Posted December 18, 2024 11 minutes ago, kikinjo said: This is the easiest way, for other tool you can add that tools user to emby group. Also look at the post that Luke posted, there is alot of information on this forum that will help. Cheers How it works i know, when i read the first part of lukes link. But my problem is, have some tools all this tools are setup so user:mediafolder group. All the tools works fine. So that should be working that i can change emby:mediafolder or is this not working ? I have looked in the systemd emby service, there is only user:emyb no group entry or so. Or did emby only work emby:emby ? I have tried add emby to group mediafolder, but this will not work.
Q-Droid 989 Posted December 18, 2024 Posted December 18, 2024 (edited) The "-d" option posted by @kikinjo is what allows new files and directories to inherit the ACLs for the emby user to retain access. If you want Emby to have a different runtime group you can change the primary gid for the emby user or update the service unit to run as another group. If running docker then give it the alternate gid. Edited December 18, 2024 by Q-Droid 1
Kodi_Newcomer 27 Posted December 18, 2024 Author Posted December 18, 2024 37 minutes ago, Q-Droid said: The "-d" option posted by @kikinjo is what allows new files and directories to inherit the ACLs for the emby user to retain access. If you want Emby to have a different runtime group you can change the primary gid for the emby user or update the service unit to run as another group. If running docker then give it the alternate gid. Can you help me for this, im not so fit with linux. Where can i change this things ?
Kodi_Newcomer 27 Posted December 19, 2024 Author Posted December 19, 2024 3 hours ago, Q-Droid said: What distro are you running? Im running on debian bookworm, when you mean this.
Q-Droid 989 Posted December 19, 2024 Posted December 19, 2024 You can change the runtime group by adding an override to the emby-server unit. The command opens an editor then you can add the lines below it. Replace value with the existing group name you want to use. Old files will retain their ownership and new files created by emby will have the new group ownership. systemctl edit emby-server.service [Service] Group=value Save and restart the emby-server service. 1
Kodi_Newcomer 27 Posted December 20, 2024 Author Posted December 20, 2024 Failed to create directories for "/etc/systemd/system/emby-server.service.d/override.conf": File or directory not found. I have looked at the folder, there is nothing with emby-server ...
Kodi_Newcomer 27 Posted December 20, 2024 Author Posted December 20, 2024 (edited) without root and sudo. But in the path there is no emby... Should i try it with sudo ? I try'ed it with sudo, i have seen some lines, with #. I add group=medienfolder. Quote Editing "/etc/systemd/system/emby-server.service.d/override.conf" canceled: temporary file is empty. Edited December 20, 2024 by Kodi_Newcomer
Kodi_Newcomer 27 Posted December 20, 2024 Author Posted December 20, 2024 Yes i did. I delet the # from [Service] it changed to green, then i add a line without # Group=mediafolder. Safe, yes, and then the line was dropped in the console.
Q-Droid 989 Posted December 20, 2024 Posted December 20, 2024 Did you read the text while in the editor? There is a section for the additions, they need to be between those two lines.
Kodi_Newcomer 27 Posted December 20, 2024 Author Posted December 20, 2024 (edited) 15 minutes ago, Q-Droid said: Did you read the text while in the editor? There is a section for the additions, they need to be between those two lines. Oh men, im so blind. Now it works So now i have to restart the emby server and it should work. What happend when i update emby, must i do this again ? I thank you very much my friend !!! Edited December 20, 2024 by Kodi_Newcomer
Q-Droid 989 Posted December 20, 2024 Posted December 20, 2024 No. This approach is the way to make changes persist across updates. Making these changes in other ways run the risk of being changed back when you update the server. Easy way to check is looking at the emby log files ownership. New ones should have the new group.
Murat6559 1 Posted January 8 Posted January 8 On 12/18/2024 at 7:14 PM, kikinjo said: Hey u need to set permissions like this on folders where your media is: sudo setfacl -m u:emby:rwx /home/user/media sudo setfacl -R -m u:emby:rwx /home/user/media sudo setfacl -R -d -m u:emby:rwx /home/user/media cheers Adapt this according to your folder structure, it solves the problem 1
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now