Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <20020408170200.58999.qmail@web13708.mail.yahoo.com> Date: Mon, 8 Apr 2002 10:02:00 -0700 (PDT) From: Stanislav Sinyagin Subject: Re: ProFTPd ported to Cygwin To: "Gerrit P. Haase" , cygwin AT cygwin DOT com In-Reply-To: <20020408072441.95851.qmail@web13703.mail.yahoo.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="0-1739754804-1018285320=:54182" --0-1739754804-1018285320=:54182 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline --- 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 http://bugs.proftpd.org Cheers, Stan __________________________________________________ Do You Yahoo!? Yahoo! Tax Center - online filing with TurboTax http://taxes.yahoo.com/ --0-1739754804-1018285320=:54182 Content-Type: text/plain; name="README.Cygwin" Content-Description: README.Cygwin Content-Disposition: inline; filename="README.Cygwin" ProFTPD 1.2.0 README.Cygwin =========================== Introduction ------------ 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 make install Installing as Windows service ----------------------------- Create a shell script and put it somewhere, with the following contents: --8<--Cut here-- #!/bin/sh # 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" --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" command. 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. 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" command. 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. Author: Stanislav Sinyagin CCIE #5478 ssinyagin AT yahoo DOT com --0-1739754804-1018285320=:54182 Content-Type: text/plain; name="proftpd.conf" Content-Description: proftpd.conf Content-Disposition: inline; filename="proftpd.conf" # 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. AllowOverwrite on # A basic anonymous configuration, no upload directories. 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 DenyAll AllowAll --0-1739754804-1018285320=:54182 Content-Type: text/plain; charset=us-ascii -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/ --0-1739754804-1018285320=:54182--