Jey2024 19 Posted May 2 Share Posted May 2 (edited) Hi I'm trying to setup a test dedicated server and playing with the permissions now. Ultimately I do not wish to use root therefore I created a user called media, added to sudoers just to install Emby, everything worked well but the problem is when I checked emby process is running as emby user - root@mediaserver1:~# ps aux | grep emby emby 1386 1.9 6.9 3692672 274028 ? Ssl 06:21 0:05 /opt/emby-server/system/EmbyServer -programdata /var/lib/emby -ffdetect /opt/emby-server/bin/ffdetect -ffmpeg /opt/emby-server/bin/ffmpeg -ffprobe /opt/emby-server/bin/ffprobe -restartexitcode 3 -updatepackage emby- My Downloads (library) folder is owned by the media user - root@mediaserver1:/home/media/Downloads# ls -lah total 16K drwxrwxr-x+ 4 media media 4.0K May 2 05:04 . drwxr-x--- 5 media media 4.0K May 2 05:10 .. drwxrwxr-x+ 3 media media 4.0K May 2 06:19 complete drwxrwxr-x 2 media media 4.0K May 2 06:19 incomplete Because of this, when I scan the library it's not picking up the files. If I run this command : chown -R emby:emby /home/media/Downloads/complete then it's working fine and the scanning is picking up new files. But I do not wish to change the ownership of these directories to emby. I would like to keep it as media. I even added the groups to this user : root@mediaserver1:/home/media/Downloads# for user in $(awk -F: '{print $1}' /etc/passwd); do groups $user; done | grep emby media : media video users render emby emby : emby video users render media As per this guide - I tried editing this file : /usr/lib/systemd/system/emby-server.service and /etc/init/emby-server.conf to change the User but that didn't help. Can someone point me in the right direction to figure out why everything is working fine except for the scanning? Basically I will remove "media" user from sudoers once my setup is conplete. sabnzbd is running as media user. I want emby to run as media as well. That way it won't have any problem accessing my downloads directory. Edited May 2 by Jey2024 Link to comment Share on other sites More sharing options...
Jey2024 19 Posted May 2 Author Share Posted May 2 An update. I ran these 2 ACL commands - setfacl -R -m user:emby:rwX /home/media/Downloads/complete setfacl -R -m d:user:emby:rwX /home/media/Downloads/complete and it looks like it's picking up the files now. Is this the correct method to allow permission to this emby user? Link to comment Share on other sites More sharing options...
Q-Droid 670 Posted May 2 Share Posted May 2 (edited) You're getting closer. Look into Sonarr and Radarr since SANnzbd is not really suited for media file management. Multiple users are not a problem, here's an example of how to permanently make the files and directories accessible to all of them: https://emby.media/support/articles/Linux-Unix-Permissions.html?q=linux You can change the runtime user and group for emby. If you decide to make this change then BEFORE you start the server you have to also recursively change the ownership of all of the files and directories in the EMBY_DATA location, usually /var/lib/emby, and any other paths you've modified already. How to edit the Emby server service unit so that it doesn't revert after an update/upgrade. But in your case you want to edit the User and maybe Group values: [Service] User= Group= Edited May 2 by Q-Droid 1 Link to comment Share on other sites More sharing options...
Jey2024 19 Posted May 3 Author Share Posted May 3 13 hours ago, Q-Droid said: You're getting closer. Look into Sonarr and Radarr since SANnzbd is not really suited for media file management. Multiple users are not a problem, here's an example of how to permanently make the files and directories accessible to all of them: https://emby.media/support/articles/Linux-Unix-Permissions.html?q=linux You can change the runtime user and group for emby. If you decide to make this change then BEFORE you start the server you have to also recursively change the ownership of all of the files and directories in the EMBY_DATA location, usually /var/lib/emby, and any other paths you've modified already. How to edit the Emby server service unit so that it doesn't revert after an update/upgrade. But in your case you want to edit the User and maybe Group values: [Service] User= Group= Thanks for the insight. So, this is what I did: I created a separate user since changing Emby's runtime user seems to be challenging. I installed sabnzb, installed Emby, added the Emby user to the new group I created, and then set the ACL permissions. Everything worked fine after that. I also installed radarr, sonarr and other arr stuff. All good now. 1 1 Link to comment Share on other sites More sharing options...
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