Howto / DirectAdmin
DirectAdmin 1.32.1 - Enable and manage Proftpd quotas based on file tables
Author: Tafaz
Visits: 2427
Date: 16.09.2008
now we create the two quota table files in /home/admin
cd /home/admin
ftpquota --create-table --type=limit
ftpquota --create-table --type=tally
and we add a test entry in the limit file to limit the upload for the user peter to 100 Mb
ftpquota --add-record --name=peter --quota-type=user --type=limit --L=soft -Bu=100 --units=mega
obviously the user peter must exist!
this command will limit the global upload for the user peter to 100 megabytes, the limitation is soft so when the user is uploading and he exceeds the quota the file will be uploaded correctly and when he tries to upload something else he will be warned that he has exceeded his quota, otherwise if the limit is set to hard when the current upload exceed the quota the transfer will be interrupted and the incomplete file will be removed.
the last thing is to edit the proftpd configuration file in order to load and configure the module
<IfModule mod_quotatab.c>
QuotaEngine on
QuotaLog /var/log/ftpd/quota.log
<IfModule mod_quotatab_file.c>
QuotaLimitTable file:/home/admin/ftpquota.limittab
QuotaTallyTable file:/home/admin/ftpquota.tallytab
</IfModule>
</IfModule>
and then we restart Proftpd
/etc/init.d/proftpd restart
now we can test the new functionality
for further informations go here http://www.castaglia.org/proftpd/doc/contrib/ProFTPD-mini-HOWTO-Quotas.html
Author: Tafaz
Visits: 2427
Date: 16.09.2008
now we create the two quota table files in /home/admin
cd /home/admin
ftpquota --create-table --type=limit
ftpquota --create-table --type=tally
and we add a test entry in the limit file to limit the upload for the user peter to 100 Mb
ftpquota --add-record --name=peter --quota-type=user --type=limit --L=soft -Bu=100 --units=mega
obviously the user peter must exist!
this command will limit the global upload for the user peter to 100 megabytes, the limitation is soft so when the user is uploading and he exceeds the quota the file will be uploaded correctly and when he tries to upload something else he will be warned that he has exceeded his quota, otherwise if the limit is set to hard when the current upload exceed the quota the transfer will be interrupted and the incomplete file will be removed.
the last thing is to edit the proftpd configuration file in order to load and configure the module
<IfModule mod_quotatab.c>
QuotaEngine on
QuotaLog /var/log/ftpd/quota.log
<IfModule mod_quotatab_file.c>
QuotaLimitTable file:/home/admin/ftpquota.limittab
QuotaTallyTable file:/home/admin/ftpquota.tallytab
</IfModule>
</IfModule>
and then we restart Proftpd
/etc/init.d/proftpd restart
now we can test the new functionality
for further informations go here http://www.castaglia.org/proftpd/doc/contrib/ProFTPD-mini-HOWTO-Quotas.html
<<
Page 2 of 2
Se vuoi discutere con noi su questo articolo o comunque vuoi porci delle domande usa il nostro Forum

