Alexandre DELAY | 1 Feb 19:18 2010
Picon

Re: [Proftpd-user] Mod_SQL SQLShowInfo - Querry with current directory issue

Sure, this is very standard.
I probably used this site when I configured it:
http://www.howtoforge.com/proftpd_mysql_virtual_hosting

Here is my conf:

------------------------------
(...)
SQLUserInfo bh2_users username clear_pass uid gid ftphomedir shell
SQLUserWhereClause "ftpLoginAllowed = 'true'"

SQLGroupInfo ftpgroup groupname gid members

CreateHome on

SQLLog PASS updatecount
SQLNamedQuery updatecount UPDATE "ftpcount=ftpcount+1, ftpaccessed=now() 
WHERE username='%u'" bh2_users

SQLLog STOR,DELE modified
SQLNamedQuery modified UPDATE "ftpmodified=now() WHERE username='%u'" 
bh2_users

QuotaEngine on
QuotaDirectoryTally on
QuotaDisplayUnits b
QuotaShowQuotas on

SQLNamedQuery get-quota-limit SELECT "name, quota_type, par_session, 
limit_type, bytes_up_limit, bytes_down_limit, bytes_transfer_limit, 
files_up_limit, files_down_limit, files_transfer_limit FROM 
bh2_ftpquotalimits WHERE name = '%{0}' AND quota_type = '%{1}'"

SQLNamedQuery get-quota-tally SELECT "name, quota_type, bytes_up_total, 
bytes_down_total, bytes_transfer_total, files_up_total, 
files_down_total, files_transfer_total FROM bh2_ftpquotatotal WHERE name 
= '%{0}' AND quota_type = '%{1}'"

SQLNamedQuery update-quota-tally UPDATE "bytes_up_total = bytes_up_total 
+ %{0}, bytes_down_total = bytes_down_total + %{1}, bytes_transfer_total 
= bytes_transfer_total + %{2}, files_up_total = files_up_total + %{3}, 
files_down_total = files_down_total + %{4}, files_transfer_total = 
files_transfer_total + %{5} WHERE name = '%{6}' AND quota_type = '%{7}'" 
bh2_ftpquotatotal

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

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

SQLNamedQuery gettally  SELECT "ROUND((bytes_up_total/1048576),2) FROM 
bh2_ftpquotatotal WHERE name='%u'"
SQLNamedQuery getlimit  SELECT "ROUND((bytes_up_limit/1048576),2) FROM 
bh2_ftpquotalimits WHERE name='%u'"

SQLShowInfo   LIST    "226" "Disk Usage %{gettally}MB over %{getlimit}MB."

SQLNamedQuery getshares  SELECT "rights FROM bh2_shares WHERE user='%u' 
AND path_user='/data/%u%d'"
SQLShowInfo   LIST    "226" "Rights %{getshares} '%d' '%D' -"
(...)
------------------------------

Le 01/02/2010 18:29, Jorge Bastos a écrit :
> Hey Alex,
>
>
>    
>> ftp>  ls
>> 229 Entering Extended Passive Mode (|||2314|)
>> 150 Opening ASCII mode data connection for file list
>> -rw-r--r--   1 user  group     7571667 Jan 15 14:51 Contrat.pdf
>> drwxr-xr-x   5 user  (?)           512 Jan 11 10:06 Mes Photos
>> drwxr-xr-x   3 user  (?)           512 Oct 22 13:56 Partages
>> drwxr-xr-x   8 user  (?)           512 Jan 18 12:11 WinGED
>> 226-Transfer complete
>>    Disk Usage 2253.35MB over 102400.00MB.
>> 226 Info {null} '' '' -
>> ---------------------
>>      
> Can you share the conf lines for this ?
>
> ">    Disk Usage 2253.35MB over 102400.00MB."
>
>
> Jorge,
>
>
> ------------------------------------------------------------------------------
> The Planet: dedicated and managed hosting, cloud storage, colocation
> Stay online with enterprise data centers and the best network in the business
> Choose flexible plans and management services without long-term contracts
> Personal 24x7 support from experience hosting pros just a phone call away.
> http://p.sf.net/sfu/theplanet-com
> _______________________________________________
> ProFTPD Users List<proftpd-users <at> proftpd.org>
> Unsubscribe problems?
> http://www.proftpd.org/list-unsub.html
>    

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
ProFTPD Users List   <proftpd-users <at> proftpd.org>
Unsubscribe problems?
http://www.proftpd.org/list-unsub.html


Gmane