summaryrefslogtreecommitdiff
path: root/package/proftpd
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2010-01-22 22:36:41 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2010-01-23 08:47:12 +0100
commitd47fe14025c27b78e8819e8f0c409b9cce1483b3 (patch)
treeedddf7359501314d1b2857a7956714d780ba08da /package/proftpd
parent1b4f7c479cbd6489a626051674f9def7446872d7 (diff)
proftpd review
- prxs is a perl-script, so probably not runnable on the target - add an init-file for the daemon - use a locally saved proftpd.conf (for now only dropped some comments)
Diffstat (limited to 'package/proftpd')
-rw-r--r--package/proftpd/Makefile3
-rw-r--r--package/proftpd/files/proftpd.conf60
-rw-r--r--package/proftpd/files/proftpd.conffiles1
-rw-r--r--package/proftpd/files/proftpd.init30
-rw-r--r--package/proftpd/files/proftpd.postinst3
5 files changed, 95 insertions, 2 deletions
diff --git a/package/proftpd/Makefile b/package/proftpd/Makefile
index c15b649a2..4dcd04eca 100644
--- a/package/proftpd/Makefile
+++ b/package/proftpd/Makefile
@@ -25,11 +25,10 @@ INSTALL_STYLE:= auto
post-install:
$(INSTALL_DIR) $(IDIR_PROFTPD)/etc
- $(INSTALL_DATA) $(WRKINST)/etc/proftpd.conf $(IDIR_PROFTPD)/etc/
+ $(INSTALL_DATA) ./files/proftpd.conf $(IDIR_PROFTPD)/etc/
$(INSTALL_DIR) $(IDIR_PROFTPD)/usr/{s,}bin
$(INSTALL_BIN) $(WRKINST)/usr/bin/ftp{count,dctl,top,who} \
$(IDIR_PROFTPD)/usr/bin/
- $(INSTALL_BIN) $(WRKINST)/usr/bin/prxs $(IDIR_PROFTPD)/usr/bin/
$(INSTALL_BIN) $(WRKINST)/usr/sbin/{ftpshut,proftpd} \
$(IDIR_PROFTPD)/usr/sbin/
diff --git a/package/proftpd/files/proftpd.conf b/package/proftpd/files/proftpd.conf
new file mode 100644
index 000000000..8d4f7f2fa
--- /dev/null
+++ b/package/proftpd/files/proftpd.conf
@@ -0,0 +1,60 @@
+ServerName "ProFTPD Default Installation"
+ServerType standalone
+DefaultServer on
+
+# Port 21 is the standard FTP port.
+Port 21
+
+# Don't use IPv6 support by default.
+UseIPv6 off
+
+# 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 30
+
+# Set the user and group under which the server will run.
+User nobody
+Group nogroup
+
+# To cause every FTP user to be "jailed" (chrooted) into their home
+# directory, uncomment this line.
+#DefaultRoot ~
+
+# Normally, we want files to be overwriteable.
+AllowOverwrite on
+
+# Bar use of SITE CHMOD by default
+<Limit SITE_CHMOD>
+ DenyAll
+</Limit>
+
+# A basic anonymous configuration, no upload directories. If you do not
+# want anonymous users, simply delete this entire <Anonymous> section.
+<Anonymous ~ftp>
+ User ftp
+ Group ftp
+
+ # 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
+ DisplayChdir .message
+
+ # Limit WRITE everywhere in the anonymous chroot
+ <Limit WRITE>
+ DenyAll
+ </Limit>
+</Anonymous>
diff --git a/package/proftpd/files/proftpd.conffiles b/package/proftpd/files/proftpd.conffiles
new file mode 100644
index 000000000..9796c366f
--- /dev/null
+++ b/package/proftpd/files/proftpd.conffiles
@@ -0,0 +1 @@
+/etc/proftpd.conf
diff --git a/package/proftpd/files/proftpd.init b/package/proftpd/files/proftpd.init
new file mode 100644
index 000000000..bf3dc0efe
--- /dev/null
+++ b/package/proftpd/files/proftpd.init
@@ -0,0 +1,30 @@
+#!/bin/sh
+#PKG proftpd
+#INIT 60
+
+. /etc/rc.conf
+
+case $1 in
+autostop) ;;
+autostart)
+ test x"${proftpd:-NO}" = x"NO" && exit 0
+ exec sh $0 start
+ ;;
+start)
+ [ -f /etc/proftpd.conf ] || exit
+ proftpd
+ ;;
+stop)
+ pkill proftpd
+ ;;
+restart)
+ sh $0 stop
+ sleep 1
+ sh $0 start
+ ;;
+*)
+ echo "Usage: $0 {start | stop | restart}"
+ exit 1
+ ;;
+esac
+exit $?
diff --git a/package/proftpd/files/proftpd.postinst b/package/proftpd/files/proftpd.postinst
new file mode 100644
index 000000000..0b3fa08aa
--- /dev/null
+++ b/package/proftpd/files/proftpd.postinst
@@ -0,0 +1,3 @@
+#!/bin/sh
+. $IPKG_INSTROOT/etc/functions.sh
+add_rcconf proftpd proftpd NO