vdrover 62 Posted January 20, 2022 Posted January 20, 2022 I wanted to test running emby as a user different from the default `emby`. I edited emby-server.service to use a different user and restarted my server. But emby simply didn't work and so I reverted the change. If I want to continue testing this, is there something else to do to allow emby to run in addition to editing emby-server.service?
mastrmind11 722 Posted January 20, 2022 Posted January 20, 2022 i would imagine you'd have to change permissions on emby's system files to match whatever user you're trying to change to? 1
vdrover 62 Posted January 20, 2022 Author Posted January 20, 2022 I changed the permissions for the media library. The current permissions of /opt/emby-server is root:root. You think that should change?
mastrmind11 722 Posted January 21, 2022 Posted January 21, 2022 Probably. Unless your user is in the root group (which it shouldn't be).
vdrover 62 Posted January 21, 2022 Author Posted January 21, 2022 Didn't work unfortunately. Not sure it's possible.
nioxbe 1 Posted August 6, 2023 Posted August 6, 2023 Emby is staring from root user sudo systemctl status emby-server.service ● emby-server.service - Emby Server is a personal media server with apps on just about every device Loaded: loaded (/lib/systemd/system/emby-server.service; enabled; preset: enabled) Active: active (running) since Sun 2023-08-06 07:01:26 BST; 1h 7min ago Main PID: 27235 (EmbyServer) Tasks: 15 (limit: 2176) CPU: 1min 13.875s CGroup: /system.slice/emby-server.service └─27235 /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-server-deb_{version}_armhf.deb so we need to modify `unit-file` # /lib/systemd/system/emby-server.service [Unit] Description=Emby Server is a personal media server with apps on just about every device After=network.target [Service] EnvironmentFile=/etc/emby-server.conf WorkingDirectory=/opt/emby-server ExecStart=/opt/emby-server/bin/emby-server RestartForceExitStatus=3 User=dietpi # <---- change your user from 'emby' by 'dietpi' in my case. [Install] WantedBy=multi-user.target now, we need to change current folder permissions and restart server. sudo chown -R dietpi:dietpi /var/lib/emby sudo systemctl daemon-reload sudo systemctl restart emby-server.service sudo systemctl status emby-server.service I hope this helps 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