Running binaries, command not found?

Associate
Joined
28 Sep 2004
Posts
1,151
Location
London
Just started developing on linux to write a server app for a windows client but I'm having trouble running binaries I've created.

My server is using a reserved port (Port 80), so if I try to run it with the standard ./a.out command I get a permission denied error. That's all well and good - you need root access to open sockets on reserved ports.

What I don't understand is that when I sudo ./a.out I get a command not found error, despite the fact that I'm still in the same dir.

Am I going mad, or just being dense? :)

Thanks

Edit: Hmph, when I change it to an unreserved port it still gives me permission denied. Despite the fact that running from netbeans works happily. :(
 
My project directory isn't in $PATH$, so that just gives command not found aswell.

Usually that's the point of the ./a.out, but in this case it gives the same error.
 
Right, chmodded it to +x.

Without sudo it won't run, with sudo it gives: ./a.out: 1: Syntax error: word unexpected (expecting ")")

Despite the fact that hitting run from within netbeans has no problem.
 
Yeah, no complaints here, works with existing shell tools like ls, cp, rm...

I'm sure it's me being a numpty, since I get the same problem on fedora, ubuntu and solaris.
 
Back
Top Bottom