How to allow a user to recalculate statistics?
By default user has no rights to execute the statistic utility.
# /usr/local/psa/admin/sbin/statistics --calculate-one --domain-name=example.com
In order to allow user to execute
/usr/local/psa/admin/sbin/statistics utility add the user to the sudo group.
It can be done in following steps:
- Connect to the server via SSH.
- Run the
visudocommand, or edit file
/etc/sudoedrsfile by using any text-editor and add the following line, which allows user to execute statistic utility without additional authorization:
CONFIG_TEXT: user_name ALL=(ALL) NOPASSWD:/usr/local/psa/admin/sbin/statistics
After that user can execute statistic utility by running it with sudo command:
# sudo /usr/local/psa/admin/sbin/statistics --calculate-one --domain-name=example.com
Note: the user should have shell access to the server.