全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

IP归属甄别会员请立即修改密码
查看: 1157|回复: 4
打印 上一主题 下一主题

[Windows VPS] 寻linux技术大帝 proftpd配置问题

[复制链接]
跳转到指定楼层
1#
发表于 2015-5-6 00:19:26 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
可以成功启动 就是死活连不上
日志:


May 05 12:21:00 ftp.: mod_sql/4.3: no SQL backends registered
May 05 12:21:00 ftp.: mod_sql.c: error initializing session: No such file or directory
May 05 12:21:00 ftp.: FTP session closed.


百度和google了一下 没找到有效线索
2#
发表于 2015-5-6 05:51:12 | 只看该作者
全部配置文件贴上来
3#
 楼主| 发表于 2015-5-6 07:24:49 | 只看该作者
本帖最后由 aLing 于 2015-5-6 07:26 编辑
h0stl0c 发表于 2015-5-6 05:51
全部配置文件贴上来

  1. #
  2. # /etc/proftpd/proftpd.conf -- This is a basic ProFTPD configuration file.
  3. # To really apply changes, reload proftpd after modifications, if
  4. # it runs in daemon mode. It is not required in inetd/xinetd mode.
  5. #

  6. # Includes DSO modules
  7. Include /etc/proftpd/modules.conf

  8. # Set off to disable IPv6 support which is annoying on IPv4 only boxes.
  9. UseIPv6                                on
  10. # If set on you can experience a longer connection delay in many cases.
  11. IdentLookups                        off

  12. ServerName                        "Debian"
  13. ServerType                        standalone
  14. DeferWelcome                        off

  15. MultilineRFC2228                on
  16. DefaultServer                        on
  17. ShowSymlinks                        on

  18. TimeoutNoTransfer                600
  19. TimeoutStalled                        600
  20. TimeoutIdle                        1200

  21. DisplayLogin                    welcome.msg
  22. DisplayChdir                       .message true
  23. ListOptions                        "-l"

  24. DenyFilter                        \*.*/

  25. # Use this to jail all users in their homes
  26. # DefaultRoot                        ~

  27. # Users require a valid shell listed in /etc/shells to login.
  28. # Use this directive to release that constrain.
  29. # RequireValidShell                off

  30. # Port 21 is the standard FTP port.
  31. Port                                21

  32. # In some cases you have to specify passive ports range to by-pass
  33. # firewall limitations. Ephemeral ports can be used for that, but
  34. # feel free to use a more narrow range.
  35. # PassivePorts                  49152 65534

  36. # If your host was NATted, this option is useful in order to
  37. # allow passive tranfers to work. You have to use your public
  38. # address and opening the passive ports used on your firewall as well.
  39. # MasqueradeAddress                1.2.3.4

  40. # This is useful for masquerading address with dynamic IPs:
  41. # refresh any configured MasqueradeAddress directives every 8 hours
  42. <IfModule mod_dynmasq.c>
  43. # DynMasqRefresh 28800
  44. </IfModule>

  45. # To prevent DoS attacks, set the maximum number of child processes
  46. # to 30.  If you need to allow more than 30 concurrent connections
  47. # at once, simply increase this value.  Note that this ONLY works
  48. # in standalone mode, in inetd mode you should use an inetd server
  49. # that allows you to limit maximum number of processes per service
  50. # (such as xinetd)
  51. MaxInstances                        30

  52. # Set the user and group that the server normally runs at.
  53. User                                proftpd
  54. Group                                nogroup

  55. # Umask 022 is a good standard umask to prevent new files and dirs
  56. # (second parm) from being group and world writable.
  57. Umask                                022  022
  58. # Normally, we want files to be overwriteable.
  59. AllowOverwrite                        on

  60. # Uncomment this if you are using NIS or LDAP via NSS to retrieve passwords:
  61. # PersistentPasswd                off

  62. # This is required to use both PAM-based authentication and local passwords
  63. # AuthOrder                        mod_auth_pam.c* mod_auth_unix.c

  64. # Be warned: use of this directive impacts CPU average load!
  65. # Uncomment this if you like to see progress and transfer rate with ftpwho
  66. # in downloads. That is not needed for uploads rates.
  67. #
  68. # UseSendFile                        off

  69. TransferLog /var/log/proftpd/xferlog
  70. SystemLog   /var/log/proftpd/proftpd.log

  71. # Logging onto /var/log/lastlog is enabled but set to off by default
  72. #UseLastlog on

  73. # In order to keep log file dates consistent after chroot, use timezone info
  74. # from /etc/localtime.  If this is not set, and proftpd is configured to
  75. # chroot (e.g. DefaultRoot or <Anonymous>), it will use the non-daylight
  76. # savings timezone regardless of whether DST is in effect.
  77. #SetEnv TZ :/etc/localtime

  78. #<IfModule mod_quotatab.c>
  79. #QuotaEngine off
  80. #</IfModule>

  81. <IfModule mod_ratio.c>
  82. Ratios off
  83. </IfModule>


  84. # Delay engine reduces impact of the so-called Timing Attack described in
  85. # http://www.securityfocus.com/bid/11430/discuss
  86. # It is on by default.
  87. <IfModule mod_delay.c>
  88. DelayEngine on
  89. </IfModule>

  90. <IfModule mod_ctrls.c>
  91. ControlsEngine        off
  92. ControlsMaxClients    2
  93. ControlsLog           /var/log/proftpd/controls.log
  94. ControlsInterval      5
  95. ControlsSocket        /var/run/proftpd/proftpd.sock
  96. </IfModule>

  97. <IfModule mod_ctrls_admin.c>
  98. AdminControlsEngine off
  99. </IfModule>

  100. #
  101. # Alternative authentication frameworks
  102. #
  103. #Include /etc/proftpd/ldap.conf
  104. #Include /etc/proftpd/sql.conf

  105. #
  106. # This is used for FTPS connections
  107. #
  108. #Include /etc/proftpd/tls.conf

  109. #
  110. # Useful to keep VirtualHost/VirtualRoot directives separated
  111. #
  112. #Include /etc/proftpd/virtuals.con

  113. # A basic anonymous configuration, no upload directories.

  114. # <Anonymous ~ftp>
  115. #   User                                ftp
  116. #   Group                                nogroup
  117. #   # We want clients to be able to login with "anonymous" as well as "ftp"
  118. #   UserAlias                        anonymous ftp
  119. #   # Cosmetic changes, all files belongs to ftp user
  120. #   DirFakeUser        on ftp
  121. #   DirFakeGroup on ftp
  122. #
  123. #   RequireValidShell                off
  124. #
  125. #   # Limit the maximum number of anonymous logins
  126. #   MaxClients                        10
  127. #
  128. #   # We want 'welcome.msg' displayed at login, and '.message' displayed
  129. #   # in each newly chdired directory.
  130. #   DisplayLogin                        welcome.msg
  131. #   DisplayChdir                .message
  132. #
  133. #   # Limit WRITE everywhere in the anonymous chroot
  134. #   <Directory *>
  135. #     <Limit WRITE>
  136. #       DenyAll
  137. #     </Limit>
  138. #   </Directory>
  139. #
  140. #   # Uncomment this if you're brave.
  141. #   # <Directory incoming>
  142. #   #   # Umask 022 is a good standard umask to prevent new files and dirs
  143. #   #   # (second parm) from being group and world writable.
  144. #   #   Umask                                022  022
  145. #   #            <Limit READ WRITE>
  146. #   #            DenyAll
  147. #   #            </Limit>
  148. #   #            <Limit STOR>
  149. #   #            AllowAll
  150. #   #            </Limit>
  151. #   # </Directory>
  152. #
  153. # </Anonymous>

  154. # Include other custom configuration files
  155. Include /etc/proftpd/conf.d/

  156. #
  157. # Alternative authentication frameworks
  158. #
  159. #Include /etc/proftpd/ldap.conf
  160. #Include /etc/proftpd/sql.conf

  161. DefaultRoot ~

  162. SQLBackend              mysql
  163. # The passwords in MySQL are encrypted using CRYPT
  164. SQLAuthTypes            Plaintext Crypt
  165. SQLAuthenticate         users groups


  166. # used to connect to the database
  167. # databasename@host database_user user_password
  168. SQLConnectInfo  ftp@localhost proftpd password


  169. # Here we tell ProFTPd the names of the database columns in the "usertable"
  170. # we want it to interact with. Match the names with those in the db
  171. SQLUserInfo     ftpuser userid passwd uid gid homedir shell

  172. # Here we tell ProFTPd the names of the database columns in the "grouptable"
  173. # we want it to interact with. Again the names match with those in the db
  174. SQLGroupInfo    ftpgroup groupname gid members

  175. # set min UID and GID - otherwise these are 999 each
  176. SQLMinID        500

  177. # create a user's home directory on demand if it doesn't exist
  178. CreateHome on

  179. # Update count every time user logs in
  180. SQLLog PASS updatecount
  181. SQLNamedQuery updatecount UPDATE "count=count+1, accessed=now() WHERE userid='%u'" ftpuser

  182. # Update modified everytime user uploads or deletes a file
  183. SQLLog  STOR,DELE modified
  184. SQLNamedQuery modified UPDATE "modified=now() WHERE userid='%u'" ftpuser

  185. # User quotas
  186. # ===========
  187. QuotaEngine on
  188. QuotaDirectoryTally on
  189. QuotaDisplayUnits Mb
  190. QuotaShowQuotas on

  191. SQLNamedQuery get-quota-limit SELECT "name, quota_type, per_session, limit_type, bytes_in_avail, bytes_out_avail, bytes_xfer_avail, files_in_avail, files_out_avail, files_xfer_avail FROM ftpquotalimits WHERE name = '%{0}' AND quota_type = '%{1}'"

  192. SQLNamedQuery get-quota-tally SELECT "name, quota_type, bytes_in_used, bytes_out_used, bytes_xfer_used, files_in_used, files_out_used, files_xfer_used FROM ftpquotatallies WHERE name = '%{0}' AND quota_type = '%{1}'"

  193. SQLNamedQuery update-quota-tally UPDATE "bytes_in_used = bytes_in_used + %{0}, bytes_out_used = bytes_out_used + %{1}, bytes_xfer_used = bytes_xfer_used + %{2}, files_in_used = files_in_used + %{3}, files_out_used = files_out_used + %{4}, files_xfer_used = files_xfer_used + %{5} WHERE name = '%{6}' AND quota_type = '%{7}'" ftpquotatallies

  194. SQLNamedQuery insert-quota-tally INSERT "%{0}, %{1}, %{2}, %{3}, %{4}, %{5}, %{6}, %{7}" ftpquotatallies

  195. QuotaLimitTable sql:/get-quota-limit
  196. QuotaTallyTable sql:/get-quota-tally/update-quota-tally/insert-quota-tally

  197. RootLogin off
  198. RequireValidShell off
复制代码


求赐教
4#
发表于 2015-5-6 09:13:35 | 只看该作者

带SQL的都注释掉。。
5#
 楼主| 发表于 2015-5-6 09:20:51 | 只看该作者
h0stl0c 发表于 2015-5-6 09:13
带SQL的都注释掉。。

我需要用到 mod_sql的模块。我是用proftpd mysql认证的
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2025-9-22 00:02 , Processed in 0.111432 second(s), 11 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表