1                      ProFTPD README.Cygwin
2                      =====================
3
4Introduction
5------------
6
7Cygwin is a UNIX-like environment framework for Microsoft Windows
898/NT/2000/XP operating systems. Most programs that you are used to using
9can compile and behave exacttly the same way as on your favorite Unix
10system. However, there are some minor differences and compatibility issues.
11
12
13Configuring and Compiling
14-------------------------
15
16In standard Cygwin setup, there's no such username as 'root'. By default,
17the configure script assigns 'Administrator' as the installation username.
18Should you want to change this, then specify a username in the
19'install_user' environment variable.
20
21The rest of the installation process is as usual:
22
23    ./configure
24    make
25    make install
26
27Note: Cygwin does not currently support large files (e.g. files larger than
282 GB).  Also, Cygwin 1.3.22 or later should be installed. Earlier versions
29of Cygwin would result in error messages like:
30
31  426 Transfer aborted.  Socket operation on non-socket
32
33Installing as Windows service
34-----------------------------
35
36Create a shell script and put it somewhere, with the following contents:
37
38--8<--Cut here--
39#!/bin/sh
40# File: proftpd-config.sh
41# Purpose: Installs proftpd daemon as a Windows service
42
43cygrunsrv --install proftpd \
44          --path /usr/local/sbin/proftpd.exe \
45          --args "--nodaemon" \
46          --type manual \
47          --disp "Cygwin proftpd" \
48          --desc "ProFTPD FTP daemon"
49--8<--Cut here--
50
51The --nodaemon option is important. It prevents the process from detaching.
52Thus you can always shut it down with "net stop proftpd" command.
53
54After running this script, you may run the daemon with "net start proftpd"
55command. Or, change the type from "manual" to "auto", and it will run on the
56system startup.
57
58You can remove the service with the command:
59    cygrunsrv --remove proftpd
60
61Installing as inetd service
62-----------------------------
63Edit the corresponding line in /etc/inetd.conf:
64
65    ftp stream tcp nowait root /usr/local/sbin/in.proftpd in.proftpd
66
67You can specify an alternative configuration file with -c option.
68
69Configuration File
70------------------
71
72The default configuration file resides in /usr/local/etc/proftpd.conf.
73However, the default version of the proftpd.conf created by the installation
74script is unusable within the Cygwin environment.
75
76Some configuration directives need to be changed as follows:
77
78    ServerType standalone|inetd
79
80        Needs to be set correctly. Having standalone when running from inetd
81        produces daemon processes which are difficult or impossible to kill.
82
83    User   System
84    Group  Administrators
85
86        By default, a Windows service runs as the SYSTEM user, and if User
87        directive specifies some other user, ProFTPD fails to change to that
88        user.  Also, if no User directive given, the daemon tries to change
89        the uid to the SYSTEM user ID.
90
91        Using a less privileged user and/or group will result in errors
92        when users attempt to login.
93
94    <Anonymous directory_name>
95
96        The user specified in User directive should exist as a Windows
97        account. In Windows User Manager, this login can be even disabled.
98        As usual, make sure you have this entry in the Cygwin /etc/passwd
99        file (produced by mkpasswd.exe).
100
101    UserPassword username encrypted_passwd
102
103        The encrypted password can be produced with the "openssl passwd"
104        command.
105
106When a user logs in, the following non-fatal warnings will appear in the
107proftpd logs:
108
109    error setting write fd IP_TOS: Invalid argument
110    error setting read fd IP_TOS: Invalid argument
111    error setting write fd TCP_NOPUSH: Protocol not available
112    error setting read fd TCP_NOPUSH: Protocol not available
113
114Author:
115Stanislav Sinyagin
116CCIE #5478
117ssinyagin@yahoo.com
118
119