proftpd.conf 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. # Includes DSO modules
  2. Include /etc/proftpd/modules.conf
  3. # Set off to disable IPv6 support which is annoying on IPv4 only boxes.
  4. UseIPv6 off
  5. # If set on you can experience a longer connection delay in many cases.
  6. IdentLookups off
  7. ServerName "##SERVER_NAME"
  8. ServerType standalone
  9. DeferWelcome off
  10. MultilineRFC2228 on
  11. DefaultServer on
  12. ShowSymlinks on
  13. TimeoutNoTransfer 600
  14. TimeoutStalled 600
  15. TimeoutIdle 1200
  16. DisplayLogin welcome.msg
  17. DisplayChdir .message true
  18. ListOptions "-l"
  19. DenyFilter \*.*/
  20. # Use this to jail all users in their homes
  21. # DefaultRoot ~
  22. # Users require a valid shell listed in /etc/shells to login.
  23. # Use this directive to release that constrain.
  24. # RequireValidShell off
  25. # Port 21 is the standard FTP port.
  26. Port 0
  27. # To prevent DoS attacks, set the maximum number of child processes
  28. # to 30. If you need to allow more than 30 concurrent connections
  29. # at once, simply increase this value. Note that this ONLY works
  30. # in standalone mode, in inetd mode you should use an inetd server
  31. # that allows you to limit maximum number of processes per service
  32. # (such as xinetd)
  33. MaxInstances 10
  34. # Set the user and group that the server normally runs at.
  35. User www-data
  36. Group www-data
  37. # Umask 022 is a good standard umask to prevent new files and dirs
  38. # (second parm) from being group and world writable.
  39. Umask 022 022
  40. # Normally, we want files to be overwriteable.
  41. AllowOverwrite on
  42. TransferLog /run/proftpd/xferlog
  43. SystemLog /run/proftpd/proftpd.log
  44. <IfModule mod_quotatab.c>
  45. QuotaEngine off
  46. </IfModule>
  47. <IfModule mod_ratio.c>
  48. Ratios off
  49. </IfModule>
  50. # Delay engine reduces impact of the so-called Timing Attack described in
  51. # http://www.securityfocus.com/bid/11430/discuss
  52. # It is on by default.
  53. <IfModule mod_delay.c>
  54. DelayEngine on
  55. </IfModule>
  56. <IfModule mod_ctrls.c>
  57. ControlsEngine off
  58. ControlsMaxClients 2
  59. ControlsLog /var/log/proftpd/controls.log
  60. ControlsInterval 5
  61. ControlsSocket /var/run/proftpd/proftpd.sock
  62. </IfModule>
  63. <IfModule mod_ctrls_admin.c>
  64. AdminControlsEngine off
  65. </IfModule>
  66. LoadModule mod_ldap.c
  67. <IfModule mod_ldap.c>
  68. # https://forums.proftpd.org/smf/index.php?topic=6368.0
  69. LDAPServer "##LDAP_URL/??sub"
  70. LDAPBindDN "##LDAP_BIND_DN" "##LDAP_BIND_PASSWORD"
  71. LDAPUsers "##LDAP_USERS_BASE_DN" (username=%u)
  72. LDAPForceDefaultUID on
  73. LDAPDefaultUID ##LDAP_UID
  74. LDAPForceDefaultGID on
  75. LDAPDefaultGID ##LDAP_GID
  76. LDAPForceGeneratedHomedir on
  77. LDAPGenerateHomedir on
  78. LDAPGenerateHomedirPrefix /app/data/public
  79. LDAPGenerateHomedirPrefixNoUsername on
  80. #LDAPUseTLS off
  81. #LDAPLog /run/proftpd/ldap.log
  82. </IfModule>
  83. <IfModule mod_sftp.c>
  84. SFTPEngine on
  85. Port ##SFTP_PORT
  86. SFTPLog /run/proftpd/sftp.log
  87. # Configure both the RSA and DSA host keys, using the same host key
  88. # files that OpenSSH uses.
  89. SFTPHostKey /app/data/sftpd/ssh_host_rsa_key
  90. SFTPHostKey /app/data/sftpd/ssh_host_dsa_key
  91. SFTPAuthMethods password
  92. # Enable compression
  93. SFTPCompression delayed
  94. RequireValidShell off
  95. </IfModule>