Hi all,
I recently decided to replace my ProFTPd with Pure-FTPd. Years ago (before ISPCP) I used pure and was quite satisfied. Now the virtual quota support was on my to-do list and I gave pure another try. The available tutorials both are ok. But some things changed in the ispcp-dsk-quota file and it took me some time to fix the patch.
Here are my changes (found in 1.0.4):
- $cmd_du is already specified ok. So we don't need to add it (declaring it 2 times fails perl)
- $size is also already specified ok. Based on the usage of du.
- so we only need to correctly call pure-quotacheck
the working diff:
Code:
maggie:/var/www/ispcp/engine/quota# diff ispcp-dsk-quota.bak ispcp-dsk-quota
87c87,89
< my $sql = "SELECT domain_id, domain_name FROM domain WHERE domain_status = 'ok';";
---
> my $sql = "SELECT domain_id, domain_name, concat('vu',domain_uid) FROM domain WHERE domain_status = 'ok';";
>
> my $cmd_quota = $main::cfg{'CMD_QUOTACHECK'};
97,98c99,100
< my $disk_limit = @$_[2];
<
---
> my $domain_uid = @$_[2];
>
99a102,103
>
> my $quotacheck = `$cmd_quota -u $domain_uid -d $main::cfg{APACHE_WWW_DIR}/$domain_name`;
finally, how can you check that it's running? Simply by:
Code:
# perl /var/www/ispcp/engine/quota/ispcp-dsk-quota
It should quit without any reply. Also, manually do a `ls -a` on your www-roots to see that the .ftpquota-files really have been created.
Okay, I hope this helps others. Someone of the documentation team might update the Howto accordingly.