Run twonky as user instead of root?
I have twonky all set up and running at boot, etc... I was wondering if it was a good idea to run the service as root, and if not how do I get it to run as a user?
Re: Run twonky as user instead of root?
Ideally the startup scripts will run the server as a different user, but a quick fix is to make the server setuid.
Shut down the server.
To create a user "twonky" run:
# adduser twonky
Make sure that /usr/local/twonkymedia is owned by the user and group you want to use to run the server.
# chown -R twonky:twonky /usr/local/twonkymedia
# chown twonky:twonky /tmp/TwonkyMediaServer-log.txt
After that, run:
# chmod 4755 /usr/local/twonkymedia/twonkymedia /usr/local/twonkymedia/twonkymediaserver
Start up the server again, and it'll be running as the user twonky.
Shut down the server.
To create a user "twonky" run:
# adduser twonky
Make sure that /usr/local/twonkymedia is owned by the user and group you want to use to run the server.
# chown -R twonky:twonky /usr/local/twonkymedia
# chown twonky:twonky /tmp/TwonkyMediaServer-log.txt
After that, run:
# chmod 4755 /usr/local/twonkymedia/twonkymedia /usr/local/twonkymedia/twonkymediaserver
Start up the server again, and it'll be running as the user twonky.