This is the mail archive of the
mailing list for the Cygwin project.
Re: ProFTPd ported to Cygwin
- From: Stanislav Sinyagin <ssinyagin at yahoo dot com>
- To: "Gerrit P. Haase" <gp at familiehaase dot de>, cygwin at cygwin dot com
- Date: Mon, 8 Apr 2002 10:02:00 -0700 (PDT)
- Subject: Re: ProFTPd ported to Cygwin
--- Stanislav Sinyagin <firstname.lastname@example.org> 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 http://bugs.proftpd.org
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.
Installing as Windows service
Create a shell script and put it somewhere, with the following contents:
# File: proftpd-config.sh
# 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"
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.
The default configuration file is resided in /usr/local/etc/proftpd.conf
The file which is created by the installation script is unusable within
Some configuration directives need to be changed as follows:
Needs to be set correctly. Having standalone when running from inetd
produces daemon processes which are difficult or impossible to kill.
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.
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 http://bugs.proftpd.org/)
are not the part of ProFTPd sources.
# 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"
# Port 21 is the standard FTP port.
# Umask 022 is a good standard umask to prevent new dirs and files
# from being group and world writable.
# 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)
# Set the user and group that the server normally runs at.
# Normally, we want files to be overwriteable.
# A basic anonymous configuration, no upload directories.
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
# We want 'welcome.msg' displayed at login, and '.message' displayed
# in each newly chdired directory.
# Limit WRITE everywhere in the anonymous chroot
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html