歡迎您光臨本站 註冊首頁

Proftp無許可權上傳問題。

←手機掃碼閱讀     火星人 @ 2014-03-04 , reply:0

Proftp無許可權上傳問題。

安裝好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*
# [email protected] database_user user_password
SQLConnectInfo [email protected]: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>
《解決方案》

這個問題我也遇到過 鬱悶死

[火星人 ] Proftp無許可權上傳問題。已經有480次圍觀

http://coctec.com/docs/service/show-post-20257.html