Преглед на файлове

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)
Phil Sutter преди 14 години
родител
ревизия
d47fe14025

+ 1 - 2
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/
 

+ 60 - 0
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>

+ 1 - 0
package/proftpd/files/proftpd.conffiles

@@ -0,0 +1 @@
+/etc/proftpd.conf

+ 30 - 0
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 $?

+ 3 - 0
package/proftpd/files/proftpd.postinst

@@ -0,0 +1,3 @@
+#!/bin/sh
+. $IPKG_INSTROOT/etc/functions.sh
+add_rcconf proftpd proftpd NO