| 1 |
# This sample configuration file illustrates creating two |
| 2 |
# virtual servers, and associated anonymous logins. |
| 3 |
|
| 4 |
ServerName "ProFTPD" |
| 5 |
ServerType inetd |
| 6 |
|
| 7 |
# Port 21 is the standard FTP port. |
| 8 |
Port 21 |
| 9 |
|
| 10 |
# Global creates a "global" configuration that is shared by the |
| 11 |
# main server and all virtualhosts. |
| 12 |
|
| 13 |
<Global> |
| 14 |
# Umask 022 is a good standard umask to prevent new dirs and files |
| 15 |
# from being group and world writable. |
| 16 |
Umask 022 |
| 17 |
</Global> |
| 18 |
|
| 19 |
# Set the user and group that the server normally runs at. |
| 20 |
User nobody |
| 21 |
Group nogroup |
| 22 |
|
| 23 |
# To prevent DoS attacks, set the maximum number of child processes |
| 24 |
# to 30. If you need to allow more than 30 concurrent connections |
| 25 |
# at once, simply increase this value. Note that this ONLY works |
| 26 |
# in standalone mode, in inetd mode you should use an inetd server |
| 27 |
# that allows you to limit maximum number of processes per service |
| 28 |
# (such as xinetd) |
| 29 |
MaxInstances 30 |
| 30 |
|
| 31 |
# Maximum seconds a data connection may "stall" |
| 32 |
TimeoutStalled 300 |
| 33 |
|
| 34 |
# First virtual server |
| 35 |
<VirtualHost ftp.virtual.com> |
| 36 |
ServerName "Virtual.com's FTP Server" |
| 37 |
|
| 38 |
MaxClients 10 |
| 39 |
MaxLoginAttempts 1 |
| 40 |
|
| 41 |
# DeferWelcome prevents proftpd from displaying the servername |
| 42 |
# until a client has authenticated. |
| 43 |
DeferWelcome on |
| 44 |
|
| 45 |
# Limit normal user logins, because we only want to allow |
| 46 |
# guest logins. |
| 47 |
<Limit LOGIN> |
| 48 |
DenyAll |
| 49 |
</Limit> |
| 50 |
|
| 51 |
# Next, create a "guest" account (which could be used |
| 52 |
# by a customer to allow private access to their web site, etc) |
| 53 |
<Anonymous ~cust1> |
| 54 |
User cust1 |
| 55 |
Group cust1 |
| 56 |
AnonRequirePassword on |
| 57 |
|
| 58 |
<Limit LOGIN> |
| 59 |
AllowAll |
| 60 |
</Limit> |
| 61 |
|
| 62 |
HideUser root |
| 63 |
HideGroup root |
| 64 |
|
| 65 |
# A private directory that we don't want the user getting in to. |
| 66 |
<Directory logs> |
| 67 |
<Limit READ WRITE DIRS> |
| 68 |
DenyAll |
| 69 |
</Limit> |
| 70 |
</Directory> |
| 71 |
</Anonymous> |
| 72 |
</VirtualHost> |
| 73 |
|
| 74 |
# Another virtual server, this one running on our primary address, |
| 75 |
# but on port 4000. The only access is to a single anonymous login. |
| 76 |
<VirtualHost our.ip.address> |
| 77 |
ServerName "Our private FTP server" |
| 78 |
Port 4000 |
| 79 |
Umask 027 |
| 80 |
|
| 81 |
<Limit LOGIN> |
| 82 |
DenyAll |
| 83 |
</Limit> |
| 84 |
|
| 85 |
<Anonymous /usr/local/ftp/virtual/a_customer> |
| 86 |
User ftp |
| 87 |
Group ftp |
| 88 |
UserAlias anonymous ftp |
| 89 |
|
| 90 |
<Limit LOGIN> |
| 91 |
AllowAll |
| 92 |
</Limit> |
| 93 |
|
| 94 |
<Limit WRITE> |
| 95 |
DenyAll |
| 96 |
</Limit> |
| 97 |
|
| 98 |
<Directory incoming> |
| 99 |
<Limit WRITE> |
| 100 |
AllowAll |
| 101 |
</Limit> |
| 102 |
</Directory> |
| 103 |
</Anonymous> |
| 104 |
</VirtualHost> |