# =========================================================
# Header details
# Copyright ........: Frank Schulte (fschulte\@hightek.com)
# Module/method ....: ./sourceforge.net/doc/pkg/proftpd/index.html
# Version ..........: 00001
# CVS ..............: $Id: index.html,v 2001/07/18 01:50:42 fschulte Exp $
# Analyst ..........: FS
# Developers .......: FS - Frank Schulte (fschulte\@hightek.com)
# Description ......: Proftpd installation documentation
#  LastAmended Name
#  ----------- -------------------------------------------------------------
# History ..........:
# Vers.     Date    SSR   By  Reason
# ----- ----------- ---- ---- ------------------------------
# 00001 19.12.2000  n/a  FS   Begin Documentation of installation process
# 00002 21.02.2001  n/a  FS   Move changelog into a seperate file.
# =========================================================
0. Changelog: here

1.1. Preparations

Setup the basic Variables and folders by hand.

# Ftp installation user/group


# ProFtpd

8.3. ProFtpd Installation

8.3.1. Introduction

SourceForge need a ftp server to handle the file releases. As for the genuine SF, we are going to use proftpd. Basically, we need to create an incoming directory and an anonymous ftp space for each project. At this time, we only support the ftp incoming directory.

8.3.2. Making

cd ${BASE_SOURCES}/sourceforge.net-binaries-needed-software
cd proftpd-1.2.0rc2

su -

groupadd ${FTP_GROUP_RUN}
groupadd ${FTP_GROUP}

useradd -m -d ${PKG}/proftpd -g ${FTP_GROUP_RUN} ${FTP_USER_RUN}

# If should not be needed to create the ${FTP_USER} because this is always created by normal Unix distributions. But please check !
# useradd -d ${VAR}/lib/${FTP_USER} -g ${FTP_GROUP} ${FTP_USER}

CFLAGS="-I/home/system/pkg/sourceforge.net/postgres/7.1beta1/include -I/home/system/pkg/sourceforge.net/postgres/7.1beta1/lib" install_user=sf-proftpd install_group=sf-proftpd ./configure --prefix=/home/system/pkg/sourceforge.net/proftpd/1.2.0rc2 --sysconfdir=/home/system/pkg/sourceforge.net/proftpd/etc --localstatedir=/home/system/var/sourceforge.net/log/proftpd --with-modules=mod_ldap:mod_linuxprivs:mod_pgsql:mod_quota:mod_ratio --enable-autoshadow


make install

8.3.3. Configure ProFtpd

1. Outcomment line/s with "ftp" at first charachters in /etc/inetd.conf to disable distribution ftp server. If in the used unix distribution the ftp service is not started by inetd but started standalone you have to disable the startup of this ftp server deamon.

Restart now the inetd deamon with the changed config file.

ps -ax | grep inetd

kill -HUP <inetd-pid>

2. Install the sourceforge.net configuration file:

cd ${PKG}/proftpd/etc
mv proftpd.conf proftpd.conf.orig

cp ${BASE_SOURCE}/sf-genericinst/conf/proftpd.conf.proftpd.1.2.0rc2 proftpd.conf

chown ${FTP_USER_RUN}:${FTP_GROUP_RUN} proftpd.conf

mkdir -p ${VAR}/ftp/incoming
chown -R ${FTP_USER_RUN}:${FTP_GROUP_RUN} ${VAR}/ftp
chmod u+rwx,g+rwx ${VAR}/ftp/incoming

3. Setup welcome.msg and .message

echo "Welcome to the ftp server for domain ${DOMAIN}" >> ${VAR}/ftp/welcome.msg
echo "Please note: only READ access !" >> ${VAR}/ftp/.message
echo "Please note: file WRITE access activated. Issue the command passive before uploading files !" >> ${VAR}/ftp/incoming/.message

chown ${FTP_USER_RUN}:${FTP_GROUP_RUN} ${VAR}/ftp/welcome.msg ${VAR}/ftp/.message ${VAR}/ftp/incoming/.message

4. Install the startupfile

cd /etc/init.d

cp ${BASE_SOURCE}/sf-genericinst/etc/init.d/proftpd.1.2.0rc2 proftpd

cd /etc/init.d/rc2.d
ln -s ../proftpd S20proftpd
ln -s ../proftpd K10proftpd

cd /etc/init.d/rc3.d
ln -s ../proftpd S20proftpd
ln -s ../proftpd K10proftpd

5. Activate the proftpd for SuSe Linux 7.0

Add lines to /etc/rc.config to include the Startup of Proftpd:

echo "#" >> /etc/rc.config
echo "# Should the proftpd Server be started at startup ?" >> /etc/rc.config
echo "#" >> /etc/rc.config
echo "START_PROFTPD=\"yes\"" >> /etc/rc.config

But check before if this is already in there.

6. Start the ProFtpd Service

/etc/init.d/proftpd start

7. Test the connection

ftp localhost

should work.

ftp localhost

should bring you in the anonymous account.

cd incoming
put filename

should work in incoming folder.