You are not logged in.
Hi,
I am quite new to arch so apologies if I am missing something obvious.
I am setting up a home server and would like to have nextcloud and emby both access the same group of files.
I have all the files I would like the two to view owned by mediaserver:mediaserver. I also have the nextcloud vhost running as mediaserver:mediaserver, my question is, how can I get emby to run as mediaserver:mediaserver.
I have tried copying the file
/usr/lib/systemd/system/emby-server.service
to
/etc/systemd/system/emby-server.service
and changed the user and group in the new file.
I then did
sudo systemctl daemon-reload
sudo systemctl start emby-server.service
sudo systemctl status emby-server.service
I then got this output:
● emby-server.service - Emby brings together your videos, music, photos, and live television.
Loaded: loaded (/etc/systemd/system/emby-server.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2017-08-24 14:59:46 BST; 12s ago
Process: 10263 ExecStart=/usr/bin/emby-server (code=exited, status=1/FAILURE)
Main PID: 10263 (code=exited, status=1/FAILURE)
Aug 24 14:59:45 jonathansnuc systemd[1]: emby-server.service: Unit entered failed state.
Aug 24 14:59:45 jonathansnuc systemd[1]: emby-server.service: Failed with result 'exit-code'.
Aug 24 14:59:46 jonathansnuc systemd[1]: emby-server.service: Service hold-off time over, scheduling restart.
Aug 24 14:59:46 jonathansnuc systemd[1]: Stopped Emby brings together your videos, music, photos, and live television..
Aug 24 14:59:46 jonathansnuc systemd[1]: emby-server.service: Start request repeated too quickly.
Aug 24 14:59:46 jonathansnuc systemd[1]: Failed to start Emby brings together your videos, music, photos, and live television..
Aug 24 14:59:46 jonathansnuc systemd[1]: emby-server.service: Unit entered failed state.
Aug 24 14:59:46 jonathansnuc systemd[1]: emby-server.service: Failed with result 'exit-code'.
Thanks in advance for any help
Last edited by jab2870 (2017-08-24 14:00:39)
Offline
What is the contents of emby-server.service ? I am not familiar with emby-server, but to answer your question directly, to run a service under a particular user/group, you can specify the User= and the Group= in the systemd service file itself. See systemd.exec(5) for more details. Also, according to https://wiki.archlinux.org/index.php/Emby , emby default runs under User=emby and Group=emby. So changing your files to that ownership might be the simplest solution.
Offline
Hello, I know it's probably a dead thread, but I was struggling with this as well, but in Ubuntu. I wanted my media files to be accessible by my home media server (Emby), but the files also accessible through Nextcloud. I set the files as an external storage in Nextcloud and so it is a case of setting all the permissions
Change ownership of media files:
sudo chown -R nextcloud-user:nextcloud-user /path_to_media_files
In systemd:
sudo nano /usr/lib/systemd/system/emby-server.service
I changed
User=nextcloud-user
Systemd pointed to a config fig file /etc/emby-server.conf, which in turn pointed to a directory /var/lib/emby and so I had to change the permission there
sudo chown -R nextcloud-user:nextcloud-user /var/lib/emby
Hope this helps!
Obviously you have to do the usual
sudo systemctl daemon-reload
sudo systemctl restart emby-server.service
sudo systemctl status emby-server.service
And when Emby updates invariably you need to change the user in Systemd again
Last edited by dom134 (2018-02-25 19:49:38)
Offline