0

Im trying to run a local web server Mongoose on mac, its default settings is listening on port 8080,I want to change it to 800 but it doesn't run mongoose once I changed it to 800. What seems to be the problem?

3

The difference is that 800 < 1024, but 8080 ≥ 1024.

Ports with numbers less than 1024 are privileged ports (google that) on Unix like systems, which means that only processes which run as root are allowed to listen to them.

| improve this answer | |
4

You have to run as root to bind to the privileged ports (<1024). You can run Mongoose via sudo, but then you will have a web server running as root. Not a good idea!

Changing user with run_as_user parameter also seems to be unsupported on Mac:

Mongoose[22361:507] The application with bundle ID (null) is running setugid(),
    which is not allowed.

Why don't you pick a port above 1024 e.g. 8081? Then you can run as unprivileged user.

For troubleshooting you can run Mongoose in Terminal.app like this:

sudo /Applications/Mongoose.app/Contents/MacOS/Mongoose
| improve this answer | |
  • @Carsten sorry, you reply came in while I was typing my reply in... – Alex Popov Nov 28 '13 at 8:48
  • Im trying to force it in 800 because I'm doing a mac version of an existing windows app. It also acts as a local web server running on port 800. It also uses Mongoose. Well I think I'll have to look for a workaround for this. – jyce1492 Nov 28 '13 at 9:10
  • Happens to me all the time, also you give additional information on the specific web server, of which I have never heard. – Carsten S Nov 28 '13 at 14:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .