Starting ffserver on macos – Permission Denied

Shashank Shekhar asked:

I am trying to start ffserver on Snow leopard.

dev:~ Shashank$ ffserver -d -f /usr/etc/ffserver.config

I get this in my terminal.

ffserver version 1.1.3 Copyright (c) 2000-2013 the FFmpeg developers
  built on Feb 27 2013 00:48:40 with gcc 4.2.1 (GCC) (Apple Inc. build 5664)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/1.1.3 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-nonfree --enable-hardcoded-tables --enable-avresample --cc=/usr/bin/gcc-4.2 --host-cflags='-Os -w -pipe -march=core2 -msse4 -mmacosx-version-min=10.6' --host-ldflags=-L/usr/local/lib --enable-libx264 --enable-libfaac --enable-libmp3lame --enable-libxvid
  libavutil      52. 13.100 / 52. 13.100
  libavcodec     54. 86.100 / 54. 86.100
  libavformat    54. 59.106 / 54. 59.106
  libavdevice    54.  3.102 / 54.  3.102
  libavfilter     3. 32.100 /  3. 32.100
  libswscale      2.  1.103 /  2.  1.103
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
bind(port 100): Permission denied
Wed Feb 27 23:08:46 2013 Could not start server

This is my config file.

Port 100
BindAddress 0.0.0.0
MaxClients 10
MaxBandwidth 50000
NoDaemon
<Feed webcam.ffm>
file /tmp/webcam.ffm
FileMaxSize 10M
</Feed>

<Stream webcam.mjpeg>
Feed webcam.ffm
Format mjpeg
VideoSize 640x480
VideoFrameRate 10
VideoBitRate 2000
VideoQMin 1
VideoQMax 10
</Stream>

Where am I going wrong? Do i need to provide more information?
Thankyou..

My answer:


You told the server to bind to port 100.

On UNIX systems such as Mac OS X and Linux, ports below 1024 can only be listened to by the root user.

To resolve the issue, use one of the following two solutions:

  1. Select a different port for the server, which is 1024 or higher.

  2. Run the server as the root user, e.g. with sudo. (Not recommended)


View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.