pltnk / docker-icecast2

Dockerfile for running icecast2 in a container.
https://hub.docker.com/r/pltnk/icecast2
MIT License
8 stars 5 forks source link

failed to load external entity "/etc/icecast2/icecast.xml" #10

Open mm-atwork opened 2 years ago

mm-atwork commented 2 years ago

Hi

Trying to start the image, I always get:

icecast2    | I/O error : Permission denied
icecast2    | I/O error : Permission denied
icecast2    | I/O warning : failed to load external entity "/etc/icecast2/icecast.xml"

Apparently the icecast user, which is the one /etc/init.d/icecast2 is using, has no permission to read /etc/icecast2/icecast.xml because its permissions are not allowing anyone else than root to read it.

-rw-r-----. 1 root root 9181 Oct 15  2020 icecast.xml

If I mount /etc/init.d/icecast2 using a modified file starting icecast as root:

[..]
  start)
    log_daemon_msg "Starting $DESC" "$NAME"
    start-stop-daemon --start --exec $DAEMON -- -b -c $CONFIGFILE
    log_end_msg $?
    ;;
[..]

it works, but this is obviously far from ideal.

It also works if I remove the mounting of the config xml file, just a test of course since this is not allowing to configure it. In this case, the xml file has the icecast group set

-rw-r-----. 1 root icecast 9181 Oct 15  2020 icecast.xml

Thanks

EntityinArray commented 3 days ago

Experiencing the same issue, icecast cannot access icecast.xml inside the container, because it's mounted with owner root:root, not root:icecast