I manage the hosting of a custom Software-as-a-Service (SAAS) CMS and Ecommerce system. This system is powered by a cluster of LAMP servers behind an HAproxy instance, and each customer / domain has their own unix account on the cluster and in LDAP. Each customer purchases a given amount of data storage which we manage using a cPanel server, so the quotas are enforced by standard linux kernel / NFS quotas.
I want to be able to provide disk space usage statistics in my customers' web admin dashboard. On the LAMP cluster as root I can run
/usr/bin/quota domain.name to get the disk space used by any given domain. However our Apache instances run as UID
Is it safe to allow
www-data to run
sudo /usr/bin/quota with