This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ProFTPd ported to Cygwin

--- Stanislav Sinyagin <> wrote:
> In the evening, I'll post my sample configuration, and the README 
> which I'm about to finish (it's all at my home PC)

As promised, see the README and the sample configuration 
in the attachment. The copy of this README is also attached to 
the bug 1569 at


Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax

                      ProFTPD 1.2.0 README.Cygwin


Cygwin is a UNIX-like environment framework for Microsoft Windows 98/NT/2000/XP
operating systems. Most programs that you are used to use and compile
behave exacttly the same way as on your favorite UNIX system.
However, there are some minor differences and compatibility issues.

Configuring and Compiling 

In standard Cygwin setup, there's no such username as 'root'.
Hence you have to specify the installer username, usually 'Administrator'.
The rest is as usual.

    install_user=Administrator ./configure
    make install

Installing as Windows service

Create a shell script and put it somewhere, with the following contents:

--8<--Cut here--
# File:
# Purpose: Installs proftpd daemon as a Windows service

cygrunsrv --install proftpd \
          --path /usr/local/sbin/proftpd.exe \
          --args "--nodaemon" \
          --type manual \
          --disp "CYGWIN proftpd" \
          --desc "ProFTPd FTP daemon"
--8<--Cut here--

The --nodaemon option is important. It prevents the process from
detouching. Thus you can always shut it down with "net stop proftpd"

After running this script, you may run the daemon
with "net start proftpd" command. Or, change the type from "manual"
to "auto", and it will run on the system startup.

You can remove the service with the command:
    cygrunsrv --remove proftpd

Installing as inetd service
Edit the corresponding line in /etc/inetd.conf:

    ftp stream tcp nowait root /usr/local/sbin/in.proftpd in.proftpd

You can specify an alternative confioguration file with -c option.

Configuration File

The default configuration file is resided in /usr/local/etc/proftpd.conf
The file which is created by the installation script is unusable within 
Cygwin environment.

Some configuration directives need to be changed as follows:

    ServerType standalone|inetd

        Needs to be set correctly. Having standalone when running from inetd
        produces daemon processes which are difficult or impossible to kill.

    User   SYSTEM
    Group  Everyone

        By default, a Windows service runs as SYSTEM user account,
        and if User directive specifies some other user, proftpd fails
        to change the uid. There seems to be a bug in changing uid,
        and it's something to work on yet. Also, if no User directive given,
        the daemon tries to change the uid to 'root', which also fails.

    <Anonymous directory_name>

        The user specified in User directive should exist as a Windows
        account. In Windows user manager, this login can be even disabled.
        As usual, make sure you have this entry in /etc/passwd file
        (produced by mkpasswd.exe).

    UserPassword username encrypted_passwd

        The encrypted password can be produced by "openssl passwd"

This file status

As of the moment of writing (8-Apr-2002), this file,
as long as the proposed patches (Bug ID 1569 at
are not the part of ProFTPd sources.

    Stanislav Sinyagin
    CCIE #5478

# This is a basic ProFTPD configuration file (rename it to 
# 'proftpd.conf' for actual use.  It establishes a single server
# and a single anonymous login.  It assumes that you have a user/group
# "nobody" and "ftp" for normal operation and anon.

ServerName			"ProFTPD Default Installation"
ServerType			standalone
DefaultServer			on

# Port 21 is the standard FTP port.
Port				21
# Umask 022 is a good standard umask to prevent new dirs and files
# from being group and world writable.
Umask				022

# To prevent DoS attacks, set the maximum number of child processes
# to 30.  If you need to allow more than 30 concurrent connections
# at once, simply increase this value.  Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit maximum number of processes per service
# (such as xinetd)
MaxInstances			10

# Set the user and group that the server normally runs at.
User				SYSTEM
Group				Everyone

# Normally, we want files to be overwriteable.
<Directory /*>
  AllowOverwrite		on

# A basic anonymous configuration, no upload directories.
<Anonymous /home/ftp>
  AnonRequirePassword           on
  RequireValidShell             off
  User				ftp
  Group				Guests

  UserPassword                  ftp 29AUutYQvsoy6

  # We want clients to be able to login with "anonymous" as well as "ftp"
  UserAlias			anonymous ftp

  # Limit the maximum number of anonymous logins
  MaxClients			10

  # We want 'welcome.msg' displayed at login, and '.message' displayed
  # in each newly chdired directory.
  DisplayLogin			welcome.msg
  DisplayFirstChdir		.message

  # Limit WRITE everywhere in the anonymous chroot
  <Limit WRITE>

  <Directory uploads>
    <Limit WRITE>


Unsubscribe info:
Bug reporting:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]