Run twonky as user instead of root?

Linux and UNIX specific discussions
vonedaddy
Posts: 22
Joined: Fri Feb 27, 2009 4:20 pm
AV Hardware: PS3

Run twonky as user instead of root?

Postby vonedaddy » Mon Jun 01, 2009 2:53 am

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?

bhigh
Posts: 2
Joined: Thu Jul 09, 2009 3:48 am
AV Hardware: Popcorn Hour A-100

Re: Run twonky as user instead of root?

Postby bhigh » Thu Jul 09, 2009 4:01 am

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.


Return to “Linux”

Who is online

Users browsing this forum: No registered users and 2 guests