ProFTPD 1.2.0 Installation Instructions ---------------------------------------- ProFTPD is designed to be configured for compilation on the target system by the GNU autoconf tool. A single shell script, named 'configure' in the source distribution top-level directory will analyze your system and create a 'config.h' file which *should* allow ProFTPD to compile cleanly. On some systems it may be necessary to give certain options to 'configure' or to tweak manually the config.h and/or the top-level Makefile produced by the 'configure' script. A list of known ports, tested and untested, is available in the README file. In addition to those set by the GNU autoconf 'configure' script, the file include/options.h contains a number of easily tweakable compile-time options which affect proftpd's operation. These are NOT modified by the configuration script in Step 1 below. Each option is documented in the header file itself. However, changing these values is rarely needed, and most of them can be overriden at runtime by directives in the proftpd.conf configuration file. Also note that a sample RPM spec file has been included in contrib/dist/rpm/. INSTALLATION INSTRUCTIONS: 1. Run the 'configure' script in the top level directory to create config.h and all the Makefiles. In addition to configuring ProFTPD to compile on your system, you can use this step to customize some parameters of or add optional features to ProFTPD. There are many configuration options. To use the default values, you would simply run: $ ./configure By default the ProFTPD files will be installed as user 'root' and the first gid=0 group found in the /etc/group file. If you wish to install using a different user or group ownership, set the install_user and install_group environment variables before running configure. Using a Bourne-ish style shell (e.g. sh, ksh, bash), you can do this on the command line like this: $ install_user=root install_group=wheel ./configure Similarly, as is typical with GNU autoconf scripts, settings for the compilation system can be made, such as the compiler: $ CC=gcc ./configure Other options can be given to configure as command line arguments. All available arguments can be listed by running './configure --help'. By default proftpd and ftpshut are installed in /usr/local/sbin/, ftpcount and ftpwho in /usr/local/bin/, the configuration file in /usr/local/etc/, and the man pages in /usr/local/man/man?/. Further, /usr/local/var/proftpd/ is used to hold the runtime scoreboard files. See the "Directory and file names" section of the './configure --help' output for the arguments to change these defaults. For instance, to place all these directories under /usr/ rather than /usr/local/, you could use: $ ./configure --prefix=/usr Or, to place the configuration file in /etc/ and the runtime state files in /var/proftpd/, you would use: $ ./configure --sysconfdir=/etc --localstatedir=/var Optional ProFTPD modules can be included using the '--with-modules=LIST' argument. This only affects additional modules, such as those found in the contrib/ directory. The core modules in the modules/ directory are mandatory and are always included by default. For example, if you wish to include both the ratio and ldap modules, you would use: $ ./configure --with-modules=mod_ratio:mod_ldap Note that if your system uses shadow password files that you wish to be used for user authentication, you may need to use either '--enable-autoshadow' or '--enable-shadow'. Also, if you wish to use the mysql module you must also include the sqlpw module. Be aware that if you ever need to rerun the configure script, you first should run 'make distclean'. 2. Watch the output of the configure script. After configure has run, you may wish to scan the config.h file to make sure configure didn't make any wrong "guesses" for your platform. 3. Run 'make' from the top-level directory. On some systems (e.g. BSDI), you may need to use GNU make (often 'gmake') instead of the system make. Watch the output of the compile process and make sure no errors occur. On some platforms (notably AIX and IRIX) you may see some compilation or link warnings. These generally can be ignored. 4. Run 'make install' from the top level source directory. This will install the ProFTPD executables and man pages. Also, the "basic.conf" configuration file (sample-configurations/basic.conf) will be copied to /usr/local/etc/proftpd.conf, unless you configured a different directory path in Step 1. 5. If the User and Group specified in proftpd.conf do not exist on your system proftpd WILL NOT RUN. Edit and modify proftpd.conf as needed. Many systems have the group "nobody" instead of the group "nogroup". 6. Decide how you want to run proftpd, either spawned by inetd (or xinetd) or as a standalone daemon. Then edit the proftpd.conf file and change the ServerType directive to match your choice, either "ServerType inetd" or "ServerType standalone". The "basic.conf" config file, installed by 'make install' in Step 4, has a default setting of "standalone". 7. Edit /etc/inetd.conf and send the inetd process the -HUP signal, so that it will reread it's now modified configuration file. To run proftpd from inetd, find the line in /etc/inetd.conf that looks something like: ftp stream tcp nowait root /usr/sbin/in.ftpd in.ftpd And replace it with: ftp stream tcp nowait root /usr/local/sbin/proftpd proftpd Or, if the tcp wrappers package is installed on your system, you may use a line something like: ftp stream tcp nowait root /usr/sbin/tcpd /usr/local/sbin/proftpd To run in standalone mode, you should comment out any ftp line in the /etc/inetd.conf file by inserting a '#' at the beginning of the line. Then send the -HUP signal to the inetd process. 8. If running in standalone mode, you probably will want to edit your boot scripts to start proftpd at boot-time. For systems that use SysV-style individual startup scripts, the source distribution includes an example init script, "contrib/dist/rpm/proftpd.init.d". Also, you can start proftpd directly from your shell prompt, but remember that it needs to be run as root to function properly. Some common error messages are: o "inet_create_connection() failed: Operation not permitted" usually means that proftpd wasn't started as root. o "bind: unable to bind to port" or "Address already in use" usually means that another process, either inetd or a standalone ftp server, is already using the ftp port. o "Fatal: Socket operation on non-socket" usually means that proftpd.conf ServerType directive is configured for inetd rather than standalone mode. 9. In order for MaxClients, MaxClientsPerHost and the ftpwho/ftpcount utilities to work, you need to specify a scoreboard path for proftpd's scoreboard files. By default this is '/usr/local/var/proftpd/', unless the default was redefined in the configuration process back in Step 1. The ScoreboardPath directive in proftpd.conf will override the default directory location. Whichever diretory is used, it must exist prior to starting proftpd, so you must create it manually if it does not already exist. No special permissions are needed on the directory, unless you wish to restrict who is allowed to run ftpwho and ftpcount. 10. Once proftpd either has been configured to be started by inetd or has been started in standalone mode, try ftp'ing to your system to make sure that everything works. If you run into a problem, see the "Troubleshooting and Help" section below. 11. If you wish to add anonymous ftp or otherwise create a more sophisticated ftp configuration, read more about configuring ProFTPD: Configuration Examples: sample-configurations/*.conf Configuration Reference: doc/Configuration.html Configuration FAQ: doc/FAQ-config.html Documentation: http://www.proftpd.net/docs/ Note that some systems will require special system-specific preparation of the anonymous ftp and other chroot directories. Also, be aware of the configuration directives "PersistentPasswd", "RequireValidShell", and "UseFtpUsers". To check the syntax of a new or modified configuration file, you should run 'proftpd -t -c ' from the command line. You can test the runtime function of your configuration file without interfering with a running server, by running a separate test server on a different port. Specify the port to use with the "Port" directive in the configuration file, but don't forget to restore the port setting before installing the new configuration file for the production server. Good luck! Troubleshooting and Help ------------------------ 1. If you encounter runtime problems, first check your syslog messages. The proftpd daemon logs all error conditions it encounters, including problems parsing the configuration file. Authentication related messages are logged using the syslog facility "auth" or, if available, "authpriv", while all other messages use the syslog "daemon" facility, unless redirected by the "-n" command line switch or by the configuration file directives SyslogFacility or SystemLog. Check your syslogd.conf to see what syslogd does with these messages. 2. If you encounter problems not easily diagnosed by the error messages, you might check for a newer ProFTPD release at the official distribution sites to see if your problem has already been addressed. 3. You can generate additional debugging messages by starting the proftpd daemon with the "-d N" command line option. N ranges from 1 to 5, and higher values increase the number of debugging messages. If you are running the daemon standalone, you also may wish to use the "-n" option, which will keep the daemon from disassociating from your terminal and cause all messages to display directly on your terminal rather than being syslogged. 4. Before asking for help on the mailing list, look through the available documentation, including the FAQ and the searchable archives of the mailing lists. Many common questions are answered in those documents. When posting to a mailing list, try to be clear and concise, but give enough information to enable people to help. Merely stating something like "It doesn't work. Help!" is unlikely to elicit useful answers. At a minimum you should include your OS version (e.g. 'uname -a'), the ProFTPD version ('proftpd -v') and list of modules ('proftpd -l'). Describe your problem as completely as possible, including any relevant error log messages or debug output. Often it is useful to include part or all of your proftpd.conf file. Various subjects: README.* Config/Problem FAQ: doc/FAQ-config.html WWW: http://www.proftpd.net FTP: ftp://ftp.proftpd.net/pub/proftpd Documentation: http://www.proftpd.net/docs/ FAQ (hyperlinked file): http://www.proftpd.net/docs/proftpdfaq.html FAQ (single html file): http://www.proftpd.net/docs/proftpdfaq-full.html User Guide (draft): http://hamster.wibble.org/proftpd/proftpd_userguide.html Config Reference: http://www.proftpd.net/docs/configuration.html (similar or identical to doc/Configuration.html) End User Mailing List: proftpd@proftpd.net (searchable archives) http://www.proftpd.net/lists.html Developer Mailing List: proftpd-devel@proftpd.net (searchable archives) http://www.proftpd.net/lists.html Bug reports & patches: http://bugs.proftpd.net Patches: macgyver@tos.net or proftpd-devel@proftpd.net Note that the www.proftpd.org site is no longer officially being maintained.