• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

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