免费注册 查看新帖 |

Chinaunix

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

[FTP] Proftp无权限上传问题。 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-05-29 21:26 |只看该作者 |倒序浏览
安装好mysql和quota认证,
用mysql建立一个新的用户test,但使用test这个用户上传文件到mysql指定的homedir---/home/www/test却没有权限,更奇怪的是test可以访问上一级的目录,也就是ftp的根目录/home/www,而且上传文件正常,不知道是什么原因,proftpd.conf文件如下。

希望高人指教。

Port 21
ServerType                      standalone
DefaultServer                   on

Umask 022

MaxInstances 30
MaxLoginAttempts 3

User ftpuser
Group ftpuser

MaxHostsPerUser 1 "Sorry, you may not connect more than one time."
MaxClientsPerUser 2 "Only one such user at a time."
MaxClientsPerHost 3 "Sorry, you may not connect more than one time."

UseReverseDNS off
IdentLookups     off
RootLogin off
RequireValidShell off
TimeoutStalled 10
MaxClients 10
AllowForeignAddress on
PassivePorts 49152 65534
AllowStoreRestart on
ServerIdent off
DefaultRoot /home/www

<Global>

SQLAuthTypes Backend Plaintext
SQLAuthenticate users* groups*
# databasename@host database_user user_password
SQLConnectInfo proftp@localhost:3306 root cngrain
SQLUserInfo ftpuser userid passwd uid gid homedir shell
SQLGroupInfo ftpgroup groupname gid members
# Update count every time user logs in
SQLLog PASS updatecount
SQLNamedQuery updatecount UPDATE "count=count+1,accessed=now() WHERE userid='%u'" ftpuser
# Update modified everytime user uploads or deletes a file
SQLLog STOR,DELE modified
SQLNamedQuery modified UPDATE "modified=now() WHERE userid='%u'" ftpuser

QuotaEngine on
QuotaDirectoryTally on
QuotaDisplayUnits Mb
QuotaShowQuotas on
QuotaLog "/var/log/quota"


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}'"

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}'"

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 uota_type = '%{7}'" ftpquotatallies

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


QuotaLimitTable sql:/get-quota-limit
QuotaTallyTable sql:/get-quota-tally/update-quota-tally/insert-quota-tally
</Global>

<Directory ~>
  <Limit MKD XMKD RNFR RNTO DELE RMD XRMD STOR WRITE>
    AllowAll
  </Limit>
</Directory>

论坛徽章:
0
2 [报告]
发表于 2009-10-21 20:55 |只看该作者
这个问题我也遇到过 郁闷死
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP