免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2089 | 回复: 2
打印 上一主题 下一主题

[FreeBSD] pure-ftp加载conf不能启动【解决】 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-08-28 22:14 |只看该作者 |倒序浏览
ports安装好pure-ftp, /usr/local/sbin/pure-config.pl /usr/local/etc/pure-ftpd.conf.sample
可以启动,但是当我修改  

# MySQLConfigFile               /etc/pureftpd-mysql.conf 默认项
MySQLConfigFile         /usr/local/etc/pureftpd-mysql.conf  修改后选项

pure不能启动


/usr/local/etc/pureftpd-mysql.conf
内容如下



  1. ##############################################
  2. #                                            #
  3. # Sample Pure-FTPd Mysql configuration file. #
  4. # See README.MySQL for explanations.         #
  5. #                                            #
  6. ##############################################


  7. # Optional : MySQL server name or IP. Don't define this for unix sockets.

  8. # MYSQLServer     127.0.0.1


  9. # Optional : MySQL port. Don't define this if a local unix socket is used.

  10. # MYSQLPort       3306


  11. # Optional : define the location of mysql.sock if the server runs on this host.

  12. MYSQLSocket     /tmp/mysql.sock


  13. # Mandatory : user to bind the server as.

  14. MYSQLUser       root


  15. # Mandatory : user password. You must have a password.

  16. MYSQLPassword   ****


  17. # Mandatory : database to open.

  18. MYSQLDatabase   VhostAdm


  19. # Mandatory : how passwords are stored
  20. # Valid values are : "cleartext", "crypt", "md5" and "password"
  21. # ("password" = MySQL password() function)
  22. # You can also use "any" to try "crypt", "md5" *and* "password"

  23. MYSQLCrypt      cleartext


  24. # In the following directives, parts of the strings are replaced at
  25. # run-time before performing queries :
  26. #
  27. # \L is replaced by the login of the user trying to authenticate.
  28. # \I is replaced by the IP address the user connected to.
  29. # \P is replaced by the port number the user connected to.
  30. # \R is replaced by the IP address the user connected from.
  31. # \D is replaced by the remote IP address, as a long decimal number.
  32. #
  33. # Very complex queries can be performed using these substitution strings,
  34. # especially for virtual hosting.


  35. # Query to execute in order to fetch the password

  36. ####MYSQLGetPW      SELECT Password FROM users WHERE User="\L"
  37. MYSQLGetPW      SELECT FtpPasswd FROM Vhost WHERE Privilege=1 AND FtpUser="\L"


  38. # Query to execute in order to fetch the system user name or uid

  39. ####MYSQLGetUID     SELECT Uid FROM users WHERE User="\L"


  40. # Optional : default UID - if set this overrides MYSQLGetUID

  41. #####MYSQLDefaultUID 1000
  42. MYSQLDefaultUID 1200


  43. # Query to execute in order to fetch the system user group or gid

  44. ####MYSQLGetGID     SELECT Gid FROM users WHERE User="\L"


  45. # Optional : default GID - if set this overrides MYSQLGetGID

  46. #####MYSQLDefaultGID 1000
  47. MYSQLDefaultGID 1200


  48. # Query to execute in order to fetch the home directory

  49. ####MYSQLGetDir     SELECT Dir FROM users WHERE User="\L"
  50. MYSQLGetDir     SELECT HomeDir FROM Vhost WHERE FtpUser="\L"


  51. # Optional : query to get the maximal number of files
  52. # Pure-FTPd must have been compiled with virtual quotas support.

  53. ##### MySQLGetQTAFS  SELECT QuotaFiles FROM users WHERE User="\L"
  54. MySQLGetQTAFS  SELECT QuotaFiles FROM Vhost WHERE FtpUser="\L"


  55. # Optional : query to get the maximal disk usage (virtual quotas)
  56. # The number should be in Megabytes.
  57. # Pure-FTPd must have been compiled with virtual quotas support.

  58. ##### MySQLGetQTASZ  SELECT QuotaSize FROM users WHERE User="\L"
  59. MySQLGetQTASZ  SELECT QuotaSizes FROM Vhost WHERE FtpUser="\L"


  60. # Optional : ratios. The server has to be compiled with ratio support.

  61. # MySQLGetRatioUL SELECT ULRatio FROM users WHERE User="\L"
  62. # MySQLGetRatioDL SELECT DLRatio FROM users WHERE User="\L"


  63. # Optional : bandwidth throttling.
  64. # The server has to be compiled with throttling support.
  65. # Values are in KB/s .

  66. # MySQLGetBandwidthUL SELECT ULBandwidth FROM users WHERE User="\L"
  67. # MySQLGetBandwidthDL SELECT DLBandwidth FROM users WHERE User="\L"

  68. # Enable ~ expansion. NEVER ENABLE THIS BLINDLY UNLESS :
  69. # 1) You know what you are doing.
  70. # 2) Real and virtual users match.

  71. # MySQLForceTildeExpansion 1


  72. # If you upgraded your tables to transactionnal tables (Gemini,
  73. # BerkeleyDB, Innobase...), you can enable SQL transactions to
  74. # avoid races. Leave this commented if you are using the
  75. # traditionnal MyIsam databases or old (< 3.23.x) MySQL versions.

  76. # MySQLTransactions On



复制代码


我哪里出了问题,请各位朋友给指条明路,小弟现行谢过了

[ 本帖最后由 如止水 于 2008-8-31 17:02 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2008-08-28 23:22 |只看该作者
MySQLConfigFile          /usr/local/etc/pureftpd-mysql.conf
CreateHomeDir           yes

论坛徽章:
0
3 [报告]
发表于 2008-08-31 17:01 |只看该作者
出上面的问题时      cat /var/log/messages

Unknown authentication method: mysql:/usr/local/etc/pureftpd-mysql.conf

/usr/ports/ftp/pure-ftpd下 make install时没有选择mysql、ldap等支持,后来重新make config时选择了mysql、 pam、ldap多种支持,

最后解决 /usr/ports/ftp/pure-ftpd下 make deinstall;make clean
然后make config 选择一项mysql支持,make install

然后通过
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP