• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

CLI for domain quota (-hard_quota) not working

ThomasR

Basic Pleskian
Some time ago we did give all of our clients more disk space. To manage this, we used the CLI to set the new hard quota. Although the server outputs a "SUCCESS: Update of domain 'domain.tld' complete" the value is not set.

Example: look up username for "domain.tld":
[root@server ~]# /usr/local/psa/bin/domain -i domain.tld | grep "username"
FTP Login: username
Initial the quota for "username" is set to 0:
[root@server ~]# repquota -a | grep "username"
username -- 312084 0 0 6587 0 0
We set the quota to 550MB which seems to succeed:
[root@server ~]# /usr/local/psa/bin/domain -u domain.tld -hard_quota 550M
SUCCESS: Update of domain 'domain.tld' complete.
A domain check does confirm update was successful:
[root@server ~]# /usr/local/psa/bin/domain -i domain.tld | grep "quota"
Hard disk quota: 550 MB
However, quota is not set in Linux:
[root@server ~]# repquota -a | grep "username"
username -- 312084 0 0 6587 0 0
If we do the same hard quota set up by web interface ("Web Hosting Settings"), the quota is set:
[root@server ~]# repquota -a | grep "username"
username -- 312084 0 563200 6587 0 0
If we now try to downgrade the quota from 550MB to 500MB using the CLI, we get another error:
[root@server ~]# /usr/local/psa/bin/domain -u domain.tld -hard_quota 500M
usermng: neither PSA_PASSWD nor PSA_CRYPTED_PASSWD environment variables are set. unable to determine user's password
System error 2: No such file or directory
SUCCESS: Update of domain 'domain.tld' complete.
Now, nothing is set:
[root@server ~]# repquota -a | grep "username"
username -- 312084 0 563200 6587 0 0
[root@server ~]# /usr/local/psa/bin/domain -i domain.tld | grep "quota"
Hard disk quota: 550 MB

Is this a bug?

Server and product details:
° Product: Plesk 9.5.4
° Operating system: CentOS release 5.7 (Final)
° Architecture: x86_64
° Kernel version 2.6.18-028stab089.1
° Virtualization: Parallels Virtuozzo
° Quota version: quota-3.13-5.el5
 
Is there anyone else who has tried to set the hard quota using command line interface? We have this issue on some Plesk 8.6 and Plesk 9.5 servers, not on all of them.
 
Back
Top