I want to get inetd daemon working on a machine running Cygwin. I know how to do this on Centos 4, but on Cygwin it does not seem to work.

Commands I tried are:

cygrunsrv -I xinetd -d "Cygwin Xinetd" -p /usr/sbin/xinetd -e CYGWIN=ntsec
cygrunsrv -S xinetd
/etc/rc.d/init.d/xinetd start

On Linux, I would just do:

/sbin/service xinetd restart

After editing my configuration file:


I've created this file on Cygwin, but can't seem to figure out how to start the service.

[si-xp-pro-sp3 ~] /etc/rc.d/init.d/xinetd start
/etc/rc.d/init.d/xinetd: line 22: /etc/init.d/functions: No such file or directory
Starting xinetd: /etc/rc.d/init.d/xinetd: line 59: daemon: command not found

[si-xp-pro-sp3 ~] /usr/sbin/xinetd start
Usage: xinetd [-d] [-f config_file] [-filelog filename] [-syslog facility] [-reuse]
[-limit proc_limit] [-pidfile filename] [-logprocs limit] [-shutdownprocs limit]
[-cc interval]

cygrunsrv does most of the magic but your Windows file system permissions need to be open.

This is more than just doing ls -l

You have to do this via CMD.EXE or, easier, through the EXPLORER.EXE GUI.

You specifically need to open for FULL CONTROL for SYSTEM the following directories (folders):


Select file properties on each of these and look for the Security tab.

If there is no Security tab, you have "Simple File Sharing". Turn that off with Tools -> Folder Options -> View then scroll to the very last checkbox: [ ] Use simple file sharing (recommended)

Make sure that is UNCHECKED - then you should be able to get too the Security tab for each folder.

Make sure that SYSTEM is listed under the Group or user names. Add it if not. Then make sure that when SYSTEM is highlighted that Full Control Allow is checked.

See this link for a discussion of this issue with sshd - http://www.noah.org/ssh/cygwin-sshd.html


Running /usr/bin/xinetd-config to set up xinetd should resolve these two errors:

/etc/rc.d/init.d/xinetd: line 22: /etc/init.d/functions: No such file or directory

Starting xinetd: /etc/rc.d/init.d/xinetd: line 59: daemon: command not found

  • I am here trying to install cygwin+proftpd+xinetd. I was having some troubles, and the above answer worked for me after I did a clean install of cygwin. – user2426679 Jan 5 '16 at 22:49

Does /etc/rc.d/init.d/xinetd exist? What kind of messages do you get?

Did you try simply running xinetd or /usr/sbin/xinetd?

Simply, does not mean using "start" as an argument. Check the man page for xinetd.

Fundamentally you are confused between the usage of /etc/init.d and /usr/sbin. The init.d folder contains shell scripts that are used to automatically start server processes, but can be used manually as well. sbin contains the binaries of applications. The scripts in init.d all take arguments like start and stop, but if you want to know what arguments an sbin binary takes, you have to read the man page.

When I said simpy run xinetd, I meant to type in the following shell command.


and if that doesn't work, then try


When you put spurious arguments on the command line, xinetd gets confused and doesn't even try to startup.

  • Please see added info in question. – WilliamKF Feb 23 '11 at 2:37
  • Executing /usr/sbin/xinetd gives no output and a zero status result. Should it give any output or does it just silently start up? – WilliamKF Feb 25 '11 at 1:54
  • 1
    An appropriate test for a network daemon like xinetd is to attempt to make a network connection. Or at least to use ps and see if the process appears to be running and netstat -a to see if it is listening on all the ports that you specified in the config. – Michael Dillon Feb 25 '11 at 2:25
  • The network connecion fails, a ps shows nothing running whose name includes inetd, and netstat -a does not show the port being monitored. – WilliamKF Feb 26 '11 at 16:59
  • 1
    @WilliamKF you really do need to read the xinetd man page. What does the -d option show? – Michael Dillon Feb 26 '11 at 21:08

Here is how:

cygrunsrv -I xinetd -p /usr/sbin/xinetd -d 'CYGWIN xinetd' -a '-stayalive -pidfile /var/run/xinetd.pid'
cygrunsrv -S xinetd
  • 2
    This is Aaron's answer (from four years ago), plus what the OP was already doing, plus the -a option.  Does that really make all the difference? And are you sure about that syntax?  It looks odd. Can you explain it? – Scott Oct 28 '16 at 1:49
  • Nothing on this page worked for me. I found this somewhere else and it solved my problem in a way that nothing else did. I was trying to contribute to solving this problem in a practical way. – hawkeye Oct 28 '16 at 2:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.