I am trying to use xinetd (or inetd) with netcat to act as a TCP proxy. This setup works on Linux without issue.
Under Cygwin, either as a service or from the a Cygwin command line, the (x)inetd fails to open netcat, with the error "no such file or directory".
I have tried specifying /usr/bin/nc
, /usr/bin/nc.exe
, /cygdrive/d/cygwin/usr/bin/nc.exe
, d:\cygwin\bin\nc.exe
, and a TON of other combinations of forward flashes, backslashes, Windows paths and Cygwin paths. No matter what, I get errno 2, no such file or directory
.
Any ideas? I need this working ASAP.
Edit: I thought it may have to do with it being in d:\cygwin
(lame hardcoding?) but I tested it on a machine with cygwin on C:\
, problem exists there too.
xinetd, just as any other unix-imported process, can see a unix directory. So you didn't need to use any windows directory format, especially not the backslashed variants.
Second: cygwin installs most of their binaries into
/bin
, and not into/usr/bin
./bin/nc.exe
isn't between your listed tries.If something is working with full path from command line, it needs to work from xinetd, too.
Next to that, there is another potential trouble source. It is a common syntactical problem configuring xinetd. Your services should look like so:
...thus, to the "server" settings, your should'n insert any argument! They need to by inserted to the "server_args" above. If you commits this mistake, you will get exactly the file not found problems above.