1 |
voyageur 09/09/08 16:27:22 |
2 |
|
3 |
Added: proftpd.rc7 proftpd.conf.sample |
4 |
Log: |
5 |
Bump to 1.3.3_rc1, ebuild rewritten by Bernd Lommerzheim <bernd@×××××××××××.com> in bug #276371, with lots of enhancements |
6 |
(Portage version: 2.2_rc40/cvs/Linux x86_64) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 net-ftp/proftpd/files/proftpd.rc7 |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-ftp/proftpd/files/proftpd.rc7?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-ftp/proftpd/files/proftpd.rc7?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: proftpd.rc7 |
15 |
=================================================================== |
16 |
#!/sbin/runscript |
17 |
# Copyright 1999-2009 Gentoo Foundation |
18 |
# Distributed under the terms of the GNU General Public License v2 |
19 |
# $Header: /var/cvsroot/gentoo-x86/net-ftp/proftpd/files/proftpd.rc7,v 1.1 2009/09/08 16:27:22 voyageur Exp $ |
20 |
|
21 |
opts="reload" |
22 |
|
23 |
depend() { |
24 |
need net |
25 |
use dns |
26 |
} |
27 |
|
28 |
check_configuration() { |
29 |
if [ ! -e /etc/proftpd/proftpd.conf ] ; then |
30 |
eerror "To execute the ProFTPD server you need a /etc/proftpd/proftpd.conf configuration" |
31 |
eerror "file. In /etc/proftpd you can find a sample configuration." |
32 |
return 1 |
33 |
fi |
34 |
ebegin "Checking ProFTPD configuration" |
35 |
/usr/sbin/proftpd -t -c /etc/proftpd/proftpd.conf |
36 |
eend $? "A configuration error was found. You have to fix your configuration file." |
37 |
} |
38 |
|
39 |
start() { |
40 |
if [ "${RC_CMD}" != "restart" ] ; then |
41 |
check_configuration || return 1 |
42 |
fi |
43 |
ebegin "Starting ProFTPD" |
44 |
start-stop-daemon --start --quiet \ |
45 |
--exec /usr/sbin/proftpd \ |
46 |
--pidfile /var/run/proftpd/proftpd.pid |
47 |
eend $? |
48 |
} |
49 |
|
50 |
stop() { |
51 |
if [ "${RC_CMD}" = "restart" ] ; then |
52 |
check_configuration || return 1 |
53 |
fi |
54 |
ebegin "Stopping ProFTPD" |
55 |
start-stop-daemon --stop --quiet --retry 20 \ |
56 |
--pidfile /var/run/proftpd/proftpd.pid |
57 |
eend $? |
58 |
} |
59 |
|
60 |
reload() { |
61 |
if [ ! -f /var/run/proftpd/proftpd.pid ] ; then |
62 |
eerror "ProFTPD is not running." |
63 |
return 1 |
64 |
fi |
65 |
check_configuration || return 1 |
66 |
ebegin "Reloading ProFTPD" |
67 |
kill -HUP `cat /var/run/proftpd/proftpd.pid` &>/dev/null |
68 |
eend $? |
69 |
} |
70 |
|
71 |
|
72 |
|
73 |
1.1 net-ftp/proftpd/files/proftpd.conf.sample |
74 |
|
75 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-ftp/proftpd/files/proftpd.conf.sample?rev=1.1&view=markup |
76 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-ftp/proftpd/files/proftpd.conf.sample?rev=1.1&content-type=text/plain |
77 |
|
78 |
Index: proftpd.conf.sample |
79 |
=================================================================== |
80 |
# This is a sample ProFTPD configuration file for Gentoo Linux (rename |
81 |
# it to 'proftpd.conf' for actual use). It establishes a single server |
82 |
# and a single anonymous login. |
83 |
|
84 |
ServerName "ProFTPD Default Server" |
85 |
ServerType standalone |
86 |
DefaultServer on |
87 |
RequireValidShell off |
88 |
AuthPAM off |
89 |
AuthPAMConfig ftp |
90 |
|
91 |
# Listen on the standard FTP port 21 and disable IPv6 support. |
92 |
Port 21 |
93 |
UseIPv6 off |
94 |
|
95 |
# New directories and files should not be group or world writable. |
96 |
Umask 022 |
97 |
|
98 |
# To prevent DoS attacks set the maximum number of child processes |
99 |
# to 30. If you need to allow more than 30 concurrent connections |
100 |
# at once simply increase this value. |
101 |
MaxInstances 30 |
102 |
|
103 |
# The server will run under ftp/ftp. |
104 |
User ftp |
105 |
Group ftp |
106 |
|
107 |
# Every FTP sessions is "jailed" into the user's home directory. |
108 |
DefaultRoot ~ |
109 |
|
110 |
# Generally files are overwritable. |
111 |
AllowOverwrite on |
112 |
|
113 |
# Disallow the use of the SITE CHMOD command. |
114 |
<Limit SITE_CHMOD> |
115 |
DenyAll |
116 |
</Limit> |
117 |
|
118 |
# A basic anonymous FTP account without an upload directory. |
119 |
<Anonymous ~ftp> |
120 |
User ftp |
121 |
Group ftp |
122 |
|
123 |
# Clients can login with the username "anonymous" and "ftp". |
124 |
UserAlias anonymous ftp |
125 |
|
126 |
# Limit the maximum number of parallel anonymous logins to 10. |
127 |
MaxClients 10 |
128 |
|
129 |
# Prohibit the WRITE command for the anonymous users. |
130 |
<Limit WRITE> |
131 |
DenyAll |
132 |
</Limit> |
133 |
</Anonymous> |