Advertisement
Guest User

/etc/proftpd.conf

a guest
May 14th, 2011
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.31 KB | None | 0 0
  1. # This is the ProFTPD configuration file
  2. #
  3. # See: http://www.proftpd.org/docs/directives/linked/by-name.html
  4.  
  5. # Server Config - config used for anything outside a <VirtualHost> or <Global> context
  6. # See: http://www.proftpd.org/docs/howto/Vhost.html
  7.  
  8. ServerName "ProFTPD server"
  9. ServerIdent on "FTP Server ready."
  10. ServerAdmin root@localhost
  11. DefaultServer on
  12.  
  13. # Cause every FTP user except adm to be chrooted into their home directory
  14. # Aliasing /etc/security/pam_env.conf into the chroot allows pam_env to
  15. # work at session-end time (http://bugzilla.redhat.com/477120)
  16. VRootEngine on
  17. DefaultRoot ~ !adm
  18. VRootAlias etc/security/pam_env.conf /etc/security/pam_env.conf
  19.  
  20. # Use pam to authenticate (default) and be authoritative
  21. AuthPAMConfig proftpd
  22. AuthOrder mod_auth_pam.c* mod_auth_unix.c
  23. # If you use NIS/YP/LDAP you may need to disable PersistentPasswd
  24. #PersistentPasswd off
  25.  
  26. # Don't do reverse DNS lookups (hangs on DNS problems)
  27. UseReverseDNS off
  28.  
  29. # Set the user and group that the server runs as
  30. User nobody
  31. Group nobody
  32.  
  33. # To prevent DoS attacks, set the maximum number of child processes
  34. # to 20. If you need to allow more than 20 concurrent connections
  35. # at once, simply increase this value. Note that this ONLY works
  36. # in standalone mode; in inetd mode you should use an inetd server
  37. # that allows you to limit maximum number of processes per service
  38. # (such as xinetd)
  39. MaxInstances 20
  40.  
  41. # Disable sendfile by default since it breaks displaying the download speeds in
  42. # ftptop and ftpwho
  43. UseSendfile off
  44.  
  45. ListOptions "-a"
  46.  
  47. # Define the log formats
  48. LogFormat default "%h %l %u %t \"%r\" %s %b"
  49. LogFormat auth "%v [%P] %h %t \"%r\" %s"
  50.  
  51. # Dynamic Shared Object (DSO) loading
  52. # See README.DSO and howto/DSO.html for more details
  53. #
  54. # General database support (http://www.proftpd.org/docs/contrib/mod_sql.html)
  55. # LoadModule mod_sql.c
  56. #
  57. # Mysql support (requires proftpd-mysql package)
  58. # (http://www.proftpd.org/docs/contrib/mod_sql.html)
  59. # LoadModule mod_sql_mysql.c
  60. #
  61. # Postgresql support (requires proftpd-postgresql package)
  62. # (http://www.proftpd.org/docs/contrib/mod_sql.html)
  63. # LoadModule mod_sql_postgres.c
  64. #
  65. # Quota support (http://www.proftpd.org/docs/contrib/mod_quotatab.html)
  66. # LoadModule mod_quotatab.c
  67. #
  68. # File-specific "driver" for storing quota table information in files
  69. # (http://www.proftpd.org/docs/contrib/mod_quotatab_file.html)
  70. # LoadModule mod_quotatab_file.c
  71. #
  72. # SQL database "driver" for storing quota table information in SQL tables
  73. # (http://www.proftpd.org/docs/contrib/mod_quotatab_sql.html)
  74. # LoadModule mod_quotatab_sql.c
  75. #
  76. # LDAP support (requires proftpd-ldap package)
  77. # (http://www.proftpd.org/docs/directives/linked/config_ref_mod_ldap.html)
  78. # LoadModule mod_ldap.c
  79. #
  80. # LDAP quota support (requires proftpd-ldap package)
  81. # (http://www.proftpd.org/docs/contrib/mod_quotatab_ldap.html)
  82. # LoadModule mod_quotatab_ldap.c
  83. #
  84.  
  85. # Support for authenticating users using the RADIUS protocol
  86. # (http://www.proftpd.org/docs/contrib/mod_radius.html)
  87. # LoadModule mod_radius.c
  88. #
  89. # Retrieve quota limit table information from a RADIUS server
  90. # (http://www.proftpd.org/docs/contrib/mod_quotatab_radius.html)
  91. # LoadModule mod_quotatab_radius.c
  92. #
  93. # Administrative control actions for the ftpdctl program
  94. # (http://www.proftpd.org/docs/contrib/mod_ctrls_admin.html)
  95. # LoadModule mod_ctrls_admin.c
  96. #
  97. # Execute external programs or scripts at various points in the process
  98. # of handling FTP commands
  99. # (http://www.castaglia.org/proftpd/modules/mod_exec.html)
  100. # LoadModule mod_exec.c
  101. #
  102. # Support for POSIX ACLs
  103. # (http://www.proftpd.org/docs/modules/mod_facl.html)
  104. # LoadModule mod_facl.c
  105. #
  106. # Configure server availability based on system load
  107. # (http://www.proftpd.org/docs/contrib/mod_load.html)
  108. # LoadModule mod_load.c
  109. #
  110. # Limit downloads to a multiple of upload volume (see README.ratio)
  111. # LoadModule mod_ratio.c
  112. #
  113. # Rewrite FTP commands sent by clients on-the-fly,
  114. # using regular expression matching and substitution
  115. # (http://www.proftpd.org/docs/contrib/mod_rewrite.html)
  116. # LoadModule mod_rewrite.c
  117. #
  118. # Support for miscellaneous SITE commands such as SITE MKDIR, SITE SYMLINK,
  119. # and SITE UTIME (http://www.proftpd.org/docs/contrib/mod_site_misc.html)
  120. # LoadModule mod_site_misc.c
  121. #
  122. # Use the /etc/hosts.allow and /etc/hosts.deny files, or other allow/deny
  123. # files, for IP-based access control
  124. # (http://www.proftpd.org/docs/contrib/mod_wrap.html)
  125. # LoadModule mod_wrap.c
  126.  
  127. #
  128. # Use the /etc/hosts.allow and /etc/hosts.deny files, or other allow/deny
  129. # files, as well as SQL-based access rules, for IP-based access control
  130. # (http://www.proftpd.org/docs/contrib/mod_wrap2.html)
  131. # LoadModule mod_wrap2.c
  132. #
  133. # Support module for mod_wrap2 that handles access rules stored in specially
  134. # formatted files on disk
  135. # (http://www.proftpd.org/docs/contrib/mod_wrap2_file.html)
  136. # LoadModule mod_wrap2_file.c
  137. #
  138. # Support module for mod_wrap2 that handles access rules stored in SQL
  139. # database tables (http://www.proftpd.org/docs/contrib/mod_wrap2_sql.html)
  140. # LoadModule mod_wrap2_sql.c
  141. #
  142. # Provide a flexible way of specifying that certain configuration directives
  143. # only apply to certain sessions, based on credentials such as connection
  144. # class, user, or group membership
  145. # (http://www.proftpd.org/docs/contrib/mod_ifsession.html)
  146. # LoadModule mod_ifsession.c
  147.  
  148. # TLS (http://www.castaglia.org/proftpd/modules/mod_tls.html)
  149. <IfDefine TLS>
  150. TLSEngine on
  151. TLSRequired on
  152. TLSRSACertificateFile /etc/pki/tls/certs/proftpd.pem
  153. TLSRSACertificateKeyFile /etc/pki/tls/certs/proftpd.pem
  154. TLSCipherSuite ALL:!ADH:!DES
  155. TLSOptions NoCertRequest
  156. TLSVerifyClient off
  157. #TLSRenegotiate ctrl 3600 data 512000 required off timeout 300
  158. TLSLog /var/log/proftpd/tls.log
  159. </IfDefine>
  160.  
  161. # Dynamic ban lists (http://www.proftpd.org/docs/contrib/mod_ban.html)
  162. # Enable this with PROFTPD_OPTIONS=-DDYNAMIC_BAN_LISTS in /etc/sysconfig/proftpd
  163. <IfDefine DYNAMIC_BAN_LISTS>
  164. LoadModule mod_ban.c
  165. BanEngine on
  166. BanLog /var/log/proftpd/ban.log
  167. BanTable /var/run/proftpd/ban.tab
  168.  
  169. # If the same client reaches the MaxLoginAttempts limit 2 times
  170. # within 10 minutes, automatically add a ban for that client that
  171. # will expire after one hour.
  172. BanOnEvent MaxLoginAttempts 2/00:10:00 01:00:00
  173.  
  174. # Allow the FTP admin to manually add/remove bans
  175. BanControlsACLs all allow user ftpadm
  176. </IfDefine>
  177.  
  178. # Global Config - config common to Server Config and all virtual hosts
  179. # See: http://www.proftpd.org/docs/howto/Vhost.html
  180. <Global>
  181.  
  182. # Umask 022 is a good standard umask to prevent new dirs and files
  183. # from being group and world writable
  184. Umask 022
  185.  
  186. # Don't do ident queries (hangs when the port is filtered)
  187. IdentLookups off
  188.  
  189. # Allow users to overwrite files and change permissions
  190. AllowOverwrite yes
  191. <Limit SITE_CHMOD ALL>
  192. AllowAll
  193. </Limit>
  194.  
  195. </Global>
  196.  
  197. # A basic anonymous configuration, with an upload directory
  198. # Enable this with PROFTPD_OPTIONS=-DANONYMOUS_FTP in /etc/sysconfig/proftpd
  199. <IfDefine ANONYMOUS_FTP>
  200. <Anonymous ~ftp>
  201. User ftp
  202. Group ftp
  203. AccessGrantMsg "Anonymous login ok, restrictions apply."
  204.  
  205. # We want clients to be able to login with "anonymous" as well as "ftp"
  206. UserAlias anonymous ftp
  207.  
  208. # Limit the maximum number of anonymous logins
  209. MaxClients 10 "Sorry, max %m users -- try again later"
  210.  
  211.  
  212. # Put the user into /pub right after login
  213. #DefaultChdir /pub
  214.  
  215. # We want 'welcome.msg' displayed at login, '.message' displayed in
  216. # each newly chdired directory and tell users to read README* files.
  217. DisplayLogin /welcome.msg
  218. DisplayChdir .message
  219. DisplayReadme README*
  220.  
  221. # Cosmetic option to make all files appear to be owned by user "ftp"
  222. DirFakeUser on ftp
  223. DirFakeGroup on ftp
  224.  
  225. # Limit WRITE everywhere in the anonymous chroot
  226. <Limit WRITE SITE_CHMOD>
  227. DenyAll
  228. </Limit>
  229.  
  230. # An upload directory that allows storing files but not retrieving
  231. # or creating directories.
  232. <Directory uploads/*>
  233. AllowOverwrite no
  234. <Limit READ>
  235. DenyAll
  236. </Limit>
  237.  
  238. <Limit STOR>
  239. AllowAll
  240. </Limit>
  241. </Directory>
  242.  
  243. # Don't write anonymous accesses to the system wtmp file (good idea!)
  244. WtmpLog off
  245.  
  246. # Logging for the anonymous transfers
  247. ExtendedLog /var/log/proftpd/access.log WRITE,READ default
  248. ExtendedLog /var/log/proftpd/auth.log AUTH auth
  249.  
  250. </Anonymous>
  251. </IfDefine>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement