steamcast runs only as root user (?)

Steamcast is a stand alone server that combines the features of SHOUTcast and Icecast2 and more to make one mega awesome server.
Post Reply
roehre
Posts: 1
Joined: Thu Aug 23, 2007 11:03 am

steamcast runs only as root user (?)

Post by roehre »

Hi there,

i just tried steamcast and discovered that it only runs under the root user. This is, in my opinion, not beneficial to security and so i tried to run it as the nobody user.

Running on nobody only gives me a seqmentation fault:

Code: Select all

# /sbin/start-stop-daemon --chuid nobody:nogroup --user nobody --group nogroup --start --exec /opt/steamcast/steamcast /opt/steamcast/steamcast.conf
/**************************************************/
/** Steamcast Distributed Network Multimedia Server/0.9.75 beta (Linux)
/** Written by: Jay Krivanek

/** NOTE:Use of this program indicates that you
/** have agreed to the license contained in the
/** README.txt file.
/**************************************************/

Event Log:
<08/23/[email protected]:12:30> [serv] WARNING: SourceIsSC has been defined before any SourceMount on line 27
<08/23/[email protected]:12:30> [serv] WARNING: SourceIsDefault has been defined before any SourceMount on line 28
<08/23/[email protected]:12:30> [serv] Configuration loaded from /opt/steamcast/steamcast.conf
<08/23/[email protected]:12:30> [serv] WARNING: mime.types could not be loaded, mime types will not be loaded.
<08/23/[email protected]:12:30> [serv] WARNING: steamcast.vip could not be loaded, no vips will be loaded
<08/23/[email protected]:12:30> [serv] WARNING: steamcast.ban could not be loaded, no bans will be loaded
<08/23/[email protected]:12:30> [serv] PID: 19835
<08/23/[email protected]:12:30> [serv] Listening to ANY:8123 for incoming client connections...
<08/23/[email protected]:12:30> [serv] Starting Thread pool of 5 threads...
<08/23/[email protected]:12:30> [serv] Listening to ANY:8124 for incoming source connections...
<08/23/[email protected]:12:30> [serv] Listening to 8123 for incoming stat connections...
Segmentation fault0 Nodes: 0 (Unique: 0) Tx: 0.00 bps<->0.00 bps
The files are owned by nobody, so that shouldnt be the problem:

Code: Select all

# ls -la
total 792
drwxr-xr-x 2 nobody nogroup   4096 Aug 23 16:09 .
drwxr-xr-x 3 root   root      4096 Aug 23 14:59 ..
-rw-r--r-- 1 nobody nogroup   3643 Aug 23 16:09 2007-08-23-steamcast.log
-rw-r--r-- 1 nobody nogroup  23026 Nov 19  2006 README.txt
-rw-r--r-- 1 nobody nogroup   1103 May 29  2006 mime.types
-rw-r--r-- 1 nobody nogroup    999 Jan 19  2005 steamauth.txt
-rwxr-xr-x 1 nobody nogroup 749748 Nov 19  2006 steamcast
-rw-r--r-- 1 nobody nogroup   1169 Aug 23 16:09 steamcast.conf
-rw-r--r-- 1 nobody nogroup      5 Aug 23 16:09 steamcast.pid
I dont know whats wrong, but it works fine under the root account. With shoutcast for example i never experienced problems running it under the nobody account, so it should be no problem.

For the sake of completeness, here is my config:

Code: Select all

; SERVER CONFIG
; -------------
PortBase=8123
MaxUser=64
; MaxBandwidth=0
IPMaxUser=0
LogFile=%Y-%m-%d-steamcast.log
MimeFile=mime.types
BanFile=steamcast.ban
VipFile=steamcast.vip
ScreenLog=Yes
RealtimeLog=Yes
YPLog=Yes
PidFile=steamcast.pid
NameLookups=No
ShowLastSongs=20
ClientTimeout=30

; USER CONFIG
; -----------
AdminUser=******
AdminPass=******

; SOURCE CONFIG
; -------------
SourceIsSC=Yes
SourceIsDefault=Yes

; SOURCE 1
; --------
SourceMount=/stream
SourcePass=******
SourceUserMax=64
SourceIsSC=Yes
SourceIsDefault=Yes
SourcePublic=Never
SourcePublicRelays=No

; SOURCE 2
; --------
SourceMount=/radio
SourcePass=******
SourceUserMax=10
SourceIsSC=Yes
SourceIsDefault=No
SourceAuth=No
SourceAuthMax=3
SourcePublic=Never
SourcePublicRelays=No

; SOURCE 3
; --------
SourceMount=/lowradio
SourcePass=******
SourceUserMax=10
SourceIsSC=Yes
SourceIsDefault=No
SourceAuth=No
SourceAuthMax=3
SourcePublic=Never
SourcePublicRelays=No

; ADVANCED CONFIG
; ---------------
ServIP=ANY
SrcIP=ANY
ThreadPool=5
The Server runs Debian 4.0 Etch AMD64 with lib32.

Is there any chance to solve this??

User avatar
Jay
Will work for food (Administrator)
Posts: 2933
Joined: Mon Jan 14, 2002 12:48 am
Location: Next Door
Contact:

Post by Jay »

There is no real reason why steamcast can't run as an unprivileged user. Look at your event log and resolve the Warnings.

This section is completely wrong

; SOURCE CONFIG
; -------------
SourceIsSC=Yes
SourceIsDefault=Yes

These variables cannot be defined without first defining a SourceMount

I do not advise running the current steamcast without a mimetypes file.

I would extract a default config file and then try running that as nobody to rule out the configuration problems causing the crash as opposed to the unprivileged user you are running as.
- Jay

Post Reply