Debian Codegraph @

sample-configurations/anonymous.conf

raw
1 # This sample configuration file illustrates configuring two
2 # anonymous directories, and a guest (same thing as anonymous but
3 # requires a valid password to login)
4
5 ServerName "ProFTPD Anonymous Server"
6 ServerType standalone
7
8 # Port 21 is the standard FTP port.
9 Port 21
10
11 # If you don't want normal users logging in at all, uncomment this
12 # next section
13 #<Limit LOGIN>
14 # DenyAll
15 #</Limit>
16
17 # Set the user and group that the server normally runs at.
18 User nobody
19 Group nogroup
20
21 # To prevent DoS attacks, set the maximum number of child processes
22 # to 30. If you need to allow more than 30 concurrent connections
23 # at once, simply increase this value. Note that this ONLY works
24 # in standalone mode, in inetd mode you should use an inetd server
25 # that allows you to limit maximum number of processes per service
26 # (such as xinetd)
27 MaxInstances 30
28
29 # Set the maximum number of seconds a data connection is allowed
30 # to "stall" before being aborted.
31 TimeoutStalled 300
32
33 # We want 'welcome.msg' displayed at login, and '.message' displayed
34 # in each newly chdired directory.
35 DisplayLogin welcome.msg
36 DisplayChdir .message
37
38 # Our "basic" anonymous configuration, including a single
39 # upload directory ("uploads")
40 <Anonymous ~ftp>
41
42 # Allow logins if they are disabled above.
43 <Limit LOGIN>
44 AllowAll
45 </Limit>
46
47 # Maximum clients with message
48 MaxClients 5 "Sorry, max %m users -- try again later"
49
50 User ftp
51 Group ftp
52 # We want clients to be able to login with "anonymous" as well as "ftp"
53 UserAlias anonymous ftp
54
55 # Limit WRITE everywhere in the anonymous chroot
56 <Limit WRITE>
57 DenyAll
58 </Limit>
59
60 # An upload directory that allows storing files but not retrieving
61 # or creating directories.
62 <Directory uploads/*>
63 <Limit READ>
64 DenyAll
65 </Limit>
66
67 <Limit STOR>
68 AllowAll
69 </Limit>
70 </Directory>
71 </Anonymous>
72
73 # A second anonymous ftp section. Users can login as "private". Here
74 # we hide files owned by root from being manipulated in any way.
75
76 <Anonymous /usr/local/private>
77 User bobf
78 Group users
79 UserAlias private bobf
80 UserAlias engineering bobf
81
82 # Deny access from *.evil.net and *.otherevil.net, but allow
83 # all others.
84 <Limit LOGIN>
85 Order deny,allow
86 Deny from .evil.net, .otherevil.net
87 Allow from all
88 </Limit>
89
90 # We want all uploaded files to be owned by 'engdept' group and
91 # group writable.
92 GroupOwner engdept
93 Umask 006
94
95 # Hide all files owned by user 'root'
96 HideUser root
97
98 <Limit WRITE>
99 DenyAll
100 </Limit>
101
102 # Disallow clients from any access to hidden files.
103 <Limit READ DIRS>
104 IgnoreHidden on
105 </Limit>
106
107 # Permit uploading and creation of new directories in
108 # submissions/public
109
110 <Directory submissions/public>
111 <Limit READ>
112 DenyAll
113 IgnoreHidden on
114 </Limit>
115
116 <Limit STOR MKD RMD XMKD XRMD>
117 AllowAll
118 IgnoreHidden on
119 </Limit>
120 </Directory>
121 </Anonymous>
122
123 # The last anonymous example creates a "guest" account, which clients
124 # can authenticate to only if they know the user's password.
125
126 <Anonymous ~guest>
127 User guest
128 Group nobody
129 AnonRequirePassword on
130
131 <Limit LOGIN>
132 AllowAll
133 </Limit>
134
135 # Deny write access from all except trusted hosts.
136 <Limit WRITE>
137 Order allow, deny
138 Allow from 10.0.0.
139 Deny from all
140 </Limit>
141 </Anonymous>