[Icecast] how to configure?

Thomas B. Rücker thomas at ruecker.fi
Tue Jun 11 05:07:55 UTC 2019


Hi,

On 6/10/19 1:54 PM, 威Ⅴ wrote:
>
> Hello,My name is Jacob.I'm from China.
>
> When I start "icecast -c /usr/local/etc/icecast.xml" command
>
>
> Some wrong message,i don't know how to deal it.
>
>
> [2019-06-10  21:37:27] WARN fserve/fserve_recheck_mime_types Cannot
> open mime types file /etc/mime.types
>
> ERROR: You should not run icecast2 as root
>
> Use the changeowner directive in the config file
>
>
> Can you tell me how to do?Thanks very muck!


It actually tells you one way to deal with this.

Let's take a step back though. Why is Icecast refusing to run as 'root'
user?
In the Unix/Linux world the root user has access and control over
everything, this is pretty dangerous if an unauthorized person would
gain access to it. Thus almost all daemons, services, etc. are run under
specific users that have restricted access to the system. Icecast
enforces this security measure in a "Hey, don't shoot yourself in the
foot!" way.

There are two ways to deal with this:
* Start Icecast directly from an unprivileged user
* Use changeowner in the config to tell Icecast to change to an
unprivileged user immediately

The second option is important if you want to bind to ports 80 and or
443 (generally everything below 1024) and don't address that in other
ways like setting capabilities. Do NOT use iptables, therein lies madness.

That all said, please note that there are up to date Icecast packages
for the most common distributions. Those include source packages in case
you need to rebuild for an 'exotic' CPU architecture.
https://wiki.xiph.org/Icecast_Server/Installing_latest_version_(official_Xiph_repositories)
This is ALWAYS preferred over compiling from source.

Cheers,

Thomas





More information about the Icecast mailing list