scottd34 3 Posted January 23, 2016 Share Posted January 23, 2016 Would this be the reason that I have been seeing recordings lately start being owned by a different user for the past week or so? All files were owned by 'nobody' but recently they started being owned by the first user alphabetically that I had set up in unraid. I would really like to see it go back to my files being owned by 'nobody' again so I can do renames etc without having to mess with ownership first. Link to comment Share on other sites More sharing options...
hurricanehrndz 149 Posted January 23, 2016 Share Posted January 23, 2016 (edited) Unraid template is setup to launch app with Uid 99 and Gid 100. The changes to the docker should have been transparent to the end user. Unless you did not update the template. If you havent done so please update the template. Sent from my D6603 using Tapatalk Edited January 23, 2016 by hurricanehrndz Link to comment Share on other sites More sharing options...
scottd34 3 Posted January 23, 2016 Share Posted January 23, 2016 I don't see anywhere in the unraid ui to update the templates... I only pull down the updates in the docker menu when it says update ready. The docker had an update just now, so we will see what that does. Link to comment Share on other sites More sharing options...
hurricanehrndz 149 Posted January 23, 2016 Share Posted January 23, 2016 There are several ways you can fix this. One you can edit your current template or two you update to the new template. Edit current template: 1. Click on the emby icon. 2. Click edit. 3. Click advance. 4. Under environment variables add the following (Left is Name, Right is Value): APP_UID 99 APP_GID 100 Update template: This depends on how you added the app to your server. If you using the Community Application Plugin: 1. Click on emby icon (http://serverip/docker): 2. Click remove: 3. Click add container, select the one that is name "my-EmbyServer" or similar. 4. Note the entries you have under volume. 5. Click the red X 6. Navigate toe the community application plugin (http://serverip/Apps). 7. Click update applications 8. Find emby 9. Click add. If not using community application list: 1. Click on emby icon (http://serverip/Docker): 2. Click remove: 3. Click add container, select the one that is name "my-EmbyServer" or similar. 4. Note the entries you have under volume. 5. Click the red X 6. Navigate to the repository list (might be tab within /Docker page) 7. Click Save 8. Go back Containers 9. Click add 10. Under select template: look for EmbyServer under emby 11. Finish. 1 Link to comment Share on other sites More sharing options...
scottd34 3 Posted January 23, 2016 Share Posted January 23, 2016 Ah thank you. Adding the variables was easy enough and works like a charm! 1 Link to comment Share on other sites More sharing options...
anakron 12 Posted January 25, 2016 Share Posted January 25, 2016 The instructions on the downloads page for Docker seem outdated. https://emby.media/downloads/linux-server/ They still mention MB_USER_ID and MB_GROUP_ID. But these don't seem to work anymore with the new docker image. Link to comment Share on other sites More sharing options...
hurricanehrndz 149 Posted January 25, 2016 Share Posted January 25, 2016 The instructions on the downloads page for Docker seem outdated. https://emby.media/downloads/linux-server/ They still mention MB_USER_ID and MB_GROUP_ID. But these don't seem to work anymore with the new docker image. Yes they are, please visit the wiki or the docker page for the most up to date information. I will get the instructions updated. Link to comment Share on other sites More sharing options...
peter.philipp 2 Posted February 1, 2016 Share Posted February 1, 2016 (edited) Hi there, I am running emby within as RancherOS docker container and until a few days ago everything was fine. With the latest docker build something changed: With every start of the docker container the script "/var/run/s6/etc/cont-init.d/02-user-onetime" " that starts the command "chown -R 1024:100 /config" is started. Since this command iterates over the whole directory with a huge amount of files, the startup takes quite some time. Can I somehow avoid, the startup of this script? Best regards, Peter Philipp Edited February 1, 2016 by peter.philipp Link to comment Share on other sites More sharing options...
hurricanehrndz 149 Posted February 1, 2016 Share Posted February 1, 2016 (edited) I will modify the script so as to not change permissions unless they differ. Thanks for the feedback. Sent from my D6603 using Tapatalk Edited February 1, 2016 by hurricanehrndz Link to comment Share on other sites More sharing options...
peter.philipp 2 Posted February 1, 2016 Share Posted February 1, 2016 (edited) Hi, thanks for the quick feedback. I am just tracing the startup und after this chmod, another chmod was started: "chown -R root.root /config". This time by the script "/bin/bash /usr/bin/emby-server start". Each chmod failes since the container has not the permission to chmod to root. Is that a bug? Best regards Peter Philipp Edited February 1, 2016 by peter.philipp Link to comment Share on other sites More sharing options...
hurricanehrndz 149 Posted February 1, 2016 Share Posted February 1, 2016 I will review it and thank you. Sent from my D6603 using Tapatalk Link to comment Share on other sites More sharing options...
hurricanehrndz 149 Posted February 1, 2016 Share Posted February 1, 2016 Yes it would be a bug. Sent from my D6603 using Tapatalk Link to comment Share on other sites More sharing options...
hurricanehrndz 149 Posted February 1, 2016 Share Posted February 1, 2016 (edited) Hi, thanks for the quick feedback. I am just tracing the startup und after this chmod, another chmod was started: "chown -R root.root /config". This time by the script "/bin/bash /usr/bin/emby-server start". Each chmod failes since the container has not the permission to chmod to root. Is that a bug? Best regards Peter Philipp Were did you see the chown root.root? Can you also please paste the contents of /etc/emby-server.conf from within the container. Edited February 1, 2016 by hurricanehrndz Link to comment Share on other sites More sharing options...
peter.philipp 2 Posted February 1, 2016 Share Posted February 1, 2016 (edited) I did a ps -eadf during startup, within the container: bash-4.3# ps -eadf UID PID PPID C STIME TTY TIME CMD root 1 0 0 16:38 ? 00:00:00 s6-svscan -t0 /var/run/s6/services root 25 1 0 16:38 ? 00:00:00 s6-supervise s6-fdholderd root 167 0 0 16:38 ? 00:00:00 bash root 187 1 0 16:58 ? 00:00:00 s6-supervise emby-server root 189 187 0 16:58 ? 00:00:00 /bin/bash /usr/bin/emby-server start root 205 189 1 16:58 ? 00:00:07 chown -R root.root /config root 214 167 0 17:06 ? 00:00:00 ps -eadf There you go: # Override defaults for emby initscript# sourced by /etc/init.d/emby-server and /usr/bin/emby-server # installed at /etc/emby-server.conf by the maintainer scripts # # This is a POSIX shell fragment # ## To change the defaults add any of the following settings below the comments ## ## EMBY_USER= #$EMBY_USER, username to run Emby under, the default is emby ## EMBY_GROUP= #$EMBY_GROUP, Emby server group where Emby user belongs ## EMBY_DIR= #$EMBY_DIR, the location of Emby program files the default is /usr/lib/emby-server ## EMBY_BIN= #$EMBY_BIN, full path of MediaBrowser.Server.Mono.exe the default is /usr/lib/emby-server/bin/MediaBrowser.Server.Mono.exe ## EMBY_DATA= #$EMBY_DATA, the location of Emby data, cache, logs, the default is /var/lib/emby-server ## EMBY_PIDFILE= #$EMBY_PIDFILE, the location of emby.pid, the default is /var/run/emby/emby-server.pid ## EMBY_ADD_OPTS= #$EMBY_ADD_OPTS, additional options to pass to the Emby server executable, beyond ffmpeg, ffprobe and restart ## MONO_BIN= #$MONO_BIN, full path of mono binary, the default is /usr/bin/mono-sgen ## MONO_OPTS= #$MONO_OPTS, list of additional options to pass to mono binary ## MONO_ENV= #$MONO_ENV, list of environment variables for running mono binary ## ## EXAMPLE if want to run as different user ## add EMBY_USER=username ## otherwise default emby is used EMBY_USER=root EMBY_GROUP=root EMBY_DATA=/config LOG_FILE=/dev/stdout EMBY_USER=root EMBY_GROUP=root EMBY_DATA=/config LOG_FILE=/dev/stdout EMBY_USER=root EMBY_GROUP=root EMBY_DATA=/config LOG_FILE=/dev/stdout EMBY_USER=root EMBY_GROUP=root EMBY_DATA=/config LOG_FILE=/dev/stdout Edited February 1, 2016 by peter.philipp Link to comment Share on other sites More sharing options...
hurricanehrndz 149 Posted February 1, 2016 Share Posted February 1, 2016 I did a ps -eadf during startup, within the container: bash-4.3# ps -eadf UID PID PPID C STIME TTY TIME CMD root 1 0 0 16:38 ? 00:00:00 s6-svscan -t0 /var/run/s6/services root 25 1 0 16:38 ? 00:00:00 s6-supervise s6-fdholderd root 167 0 0 16:38 ? 00:00:00 bash root 187 1 0 16:58 ? 00:00:00 s6-supervise emby-server root 189 187 0 16:58 ? 00:00:00 /bin/bash /usr/bin/emby-server start root 205 189 1 16:58 ? 00:00:07 chown -R root.root /config root 214 167 0 17:06 ? 00:00:00 ps -eadf There you go: # Override defaults for emby initscript# sourced by /etc/init.d/emby-server and /usr/bin/emby-server # installed at /etc/emby-server.conf by the maintainer scripts # # This is a POSIX shell fragment # ## To change the defaults add any of the following settings below the comments ## ## EMBY_USER= #$EMBY_USER, username to run Emby under, the default is emby ## EMBY_GROUP= #$EMBY_GROUP, Emby server group where Emby user belongs ## EMBY_DIR= #$EMBY_DIR, the location of Emby program files the default is /usr/lib/emby-server ## EMBY_BIN= #$EMBY_BIN, full path of MediaBrowser.Server.Mono.exe the default is /usr/lib/emby-server/bin/MediaBrowser.Server.Mono.exe ## EMBY_DATA= #$EMBY_DATA, the location of Emby data, cache, logs, the default is /var/lib/emby-server ## EMBY_PIDFILE= #$EMBY_PIDFILE, the location of emby.pid, the default is /var/run/emby/emby-server.pid ## EMBY_ADD_OPTS= #$EMBY_ADD_OPTS, additional options to pass to the Emby server executable, beyond ffmpeg, ffprobe and restart ## MONO_BIN= #$MONO_BIN, full path of mono binary, the default is /usr/bin/mono-sgen ## MONO_OPTS= #$MONO_OPTS, list of additional options to pass to mono binary ## MONO_ENV= #$MONO_ENV, list of environment variables for running mono binary ## ## EXAMPLE if want to run as different user ## add EMBY_USER=username ## otherwise default emby is used EMBY_USER=root EMBY_GROUP=root EMBY_DATA=/config LOG_FILE=/dev/stdout EMBY_USER=root EMBY_GROUP=root EMBY_DATA=/config LOG_FILE=/dev/stdout EMBY_USER=root EMBY_GROUP=root EMBY_DATA=/config LOG_FILE=/dev/stdout EMBY_USER=root EMBY_GROUP=root EMBY_DATA=/config LOG_FILE=/dev/stdout Okay, well how exactly are you starting the docker? I can fix the first chown for you, but the second depends on the EMBY_USER and EMBY_GROUP. I need to know how these got set to root. Link to comment Share on other sites More sharing options...
hurricanehrndz 149 Posted February 1, 2016 Share Posted February 1, 2016 Additionally, There is no reason why you should have multiple entries for EMBY_USER, EMBY_GROUP and EMBY_DATA Link to comment Share on other sites More sharing options...
peter.philipp 2 Posted February 1, 2016 Share Posted February 1, 2016 This is the docker-compose.yml: Emby: ports: - 1900:1900/udp - 7359:7359/udp - 8096:8096/tcp - 8920:8920/tcp environment: APP_CONFIG: /config APP_GID: '100' APP_UID: '1024' APP_USER: root TZ: CET labels: io.rancher.container.pull_image: always io.rancher.service.hash: 7eeaa3ebf39990c2c0e4a3c61b4677788b476f44 tty: true image: emby/embyserver volumes: - /mnt/System/docker/emby/config:/config - /mnt/video:/mnt/video stdin_open: true net: host I guess I do not use the environment variables correctly... Link to comment Share on other sites More sharing options...
hurricanehrndz 149 Posted February 1, 2016 Share Posted February 1, 2016 This is the docker-compose.yml: Emby: ports: - 1900:1900/udp - 7359:7359/udp - 8096:8096/tcp - 8920:8920/tcp environment: APP_CONFIG: /config APP_GID: '100' APP_UID: '1024' APP_USER: root TZ: CET labels: io.rancher.container.pull_image: always io.rancher.service.hash: 7eeaa3ebf39990c2c0e4a3c61b4677788b476f44 tty: true image: emby/embyserver volumes: - /mnt/System/docker/emby/config:/config - /mnt/video:/mnt/video stdin_open: true net: host I guess I do not use the environment variables correctly... Don't use APP_USER for your scenario its not necessary. If using APP_USER it should be set to the value of the USER with the same UID and GID as the APP_UID and APP_GID that you provided. Link to comment Share on other sites More sharing options...
hurricanehrndz 149 Posted February 1, 2016 Share Posted February 1, 2016 That still does not answer why you have multiple entries of EMBY_USER and EMBY_GROUP in your conf. Have you been running the 02-user-onetime script manually ? Link to comment Share on other sites More sharing options...
peter.philipp 2 Posted February 1, 2016 Share Posted February 1, 2016 (edited) No, not manually... It could have been that i started two containers parallely using the same /config path. Edited February 1, 2016 by peter.philipp Link to comment Share on other sites More sharing options...
hurricanehrndz 149 Posted February 1, 2016 Share Posted February 1, 2016 No, not manually... It could have been that i started two containers parallely using the same /config path. Maybe, I doubted it. That file is within in the container there is no reason why it should be like that. Anyhow, new containers are building to address your issue. The second chown is a fault with your docker.yaml, so if you address that and drop the APP_USER from it, it will not try to run the second chown. Link to comment Share on other sites More sharing options...
peter.philipp 2 Posted February 2, 2016 Share Posted February 2, 2016 Hey, thank you for your quick help! I'll try it right this evening (CET). All together emby & docker & rancheros is a very nice setup. Great that you push the docker implementation. Best regards, Peter Philipp 1 Link to comment Share on other sites More sharing options...
ashman70 0 Posted February 2, 2016 Share Posted February 2, 2016 I am running Emby as a docker on Unraid 6.1.7 and I am having an issue with the way my content is displayed. If I have my TV shows set to display as a poster, some show posters whereas other show banners, I've gone in several times and changed the banners to posters but these changes don't save and will eventually revert. Similarly with movies, I've changed the posters on many but the changes aren't saved and revert. I've gone into metadata manager and made these changes and saved them, still they revert. I am doing this as the appdata user btw, not sure if that matters, I have full permissions to my media directories. Now one thing about my setup that is different is that I have my media folders mounted as shares on my UnRaid server, they are not local, but the permissions are open meaning no username or password is required to make changes to them. I also have am Emby premiere subscription. Link to comment Share on other sites More sharing options...
hurricanehrndz 149 Posted February 2, 2016 Share Posted February 2, 2016 I am running Emby as a docker on Unraid 6.1.7 and I am having an issue with the way my content is displayed. If I have my TV shows set to display as a poster, some show posters whereas other show banners, I've gone in several times and changed the banners to posters but these changes don't save and will eventually revert. Similarly with movies, I've changed the posters on many but the changes aren't saved and revert. I've gone into metadata manager and made these changes and saved them, still they revert. I am doing this as the appdata user btw, not sure if that matters, I have full permissions to my media directories. Now one thing about my setup that is different is that I have my media folders mounted as shares on my UnRaid server, they are not local, but the permissions are open meaning no username or password is required to make changes to them. I also have am Emby premiere subscription.This is not a docker specific issue. I recommend you start a new thread so the other developers can help. Generally I'm the only one that checks this thread, but I only do packaging and docker Dev. Sent from my D6603 using Tapatalk Link to comment Share on other sites More sharing options...
peter.philipp 2 Posted February 4, 2016 Share Posted February 4, 2016 Hi, i just wanted to tell you that without the parameter "APP_USER" the root.root-chown does not make any trouble anymore. Thank you for your support! Best regards, Peter Philipp 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