![]() |
Cannot open a listening socket on low port numbers: The address is protected
Hi All
Binding to a listening port 25 (for example) works when I run my Qt app in windows, but fails on the device, with error code 3: The address is protected Can anyone advise how to allow opening this socket? |
Re: Cannot open a listening socket on low port numbers: The address is protected
Your app must run as root to be able to bind to a low port number.
|
Re: Cannot open a listening socket on low port numbers: The address is protected
On all unix-style systems binding to "low ports" requires root privileges.
Edit: was too slow it seems... |
Re: Cannot open a listening socket on low port numbers: The address is protected
Much better question: Why do you want to bind your GUI application to the SMTP (or any other) port, which usually is inhabitated by a daemon...
|
Re: Cannot open a listening socket on low port numbers: The address is protected
this app will, eventually, not be gui but will be a daemon. I'm jsut using a gui right now because I'm struggling to get the app to work as a daemon for different reasons:
when I develop windows services, because debugging them is a pain in the arse, its easier to just make a dummy gui that does nothing but embodies the service code. essentially rather than using the SCM to launch the app and call start() (and then struggle to attacha debugger to it) it is easier to open a blank window and start its message loop then have a button on the window call start(). same goes here, I'm doing a service/daemon, but I'm using the gui aspect first so that the phone shows me something i can interact with so I know its working/have a text panel to send debug messages to. eventually the app will not have a gui and will probably be configured using the browser i think, therefore, it may be wiser to just run a high port number in the future; it doesnt really matter - the clients of this app (smtp capable programs) can always change the port number to match the app, and it may be more sensible from an exploit point of view not to have the program running as root.. thanks to all! |
Re: Cannot open a listening socket on low port numbers: The address is protected
As people have said before, you should run in the higher port ranges as low port ranges require root priviliges. It also could be considered more secure as port scanners tend to check the lower ports for common services. Higher ports are also often unused.
|
Re: Cannot open a listening socket on low port numbers: The address is protected
Quote:
Anyways, I would run the app in terminal in foreground while debugging, shorter way to a real daemon from there (and many of the daemons in linux/unix world have an option to start in foreground for exactly this reason). Quote:
|
Re: Cannot open a listening socket on low port numbers: The address is protected
Port 0-1024 are reserved for well defined processes, eg. http is port 80.
Use a port that's between 1025 and 65,535. |
Re: Cannot open a listening socket on low port numbers: The address is protected
Quote:
Quote:
Quote:
|
Re: Cannot open a listening socket on low port numbers: The address is protected
Quote:
|
Re: Cannot open a listening socket on low port numbers: The address is protected
Quote:
Otherwise I use scratchbox for the iterative stuff, old skool... Haven't got around to MADDE/QtC yet. |
Re: Cannot open a listening socket on low port numbers: The address is protected
be aware that youre officially stuck on qt4.5 if you want the qtc+madde+clickplaytodeploy route; qt46 hack exists but qtc cannot use it directly to build armel binaries due to some errors in the mkspecs folder, possibly other errors too
|
| All times are GMT. The time now is 22:22. |
vBulletin® Version 3.8.8