|
@@ -14,7 +14,7 @@ class QuotaController {
|
|
|
|
|
|
|
|
// get quota
|
|
// get quota
|
|
|
if ($GLOBALS['debug'] == true) {error_log("Get Quota for User: " . $username); }
|
|
if ($GLOBALS['debug'] == true) {error_log("Get Quota for User: " . $username); }
|
|
|
- exec("sudo quota -p --hide-device -w $username | tail -n +3 | column -t -n quota -N blocks,soft,hard,grace,inodes,isoft,ihard,igrace -H 5 2>&1", $userOutput, $userReturnCode);
|
|
|
|
|
|
|
+ exec("sudo /usr/bin/quota -p --hide-device -w $username | tail -n +3 | column -t -n quota -N blocks,soft,hard,grace,inodes,isoft,ihard,igrace -H 5 2>&1", $userOutput, $userReturnCode);
|
|
|
if ($userReturnCode !== 0) {
|
|
if ($userReturnCode !== 0) {
|
|
|
error_log("getquota: ERROR: Getting Quota for $username failed, details => " . implode("\n", $userOutput));
|
|
error_log("getquota: ERROR: Getting Quota for $username failed, details => " . implode("\n", $userOutput));
|
|
|
http_response_code(500);
|
|
http_response_code(500);
|
|
@@ -27,7 +27,7 @@ class QuotaController {
|
|
|
public static function getStats(): void {
|
|
public static function getStats(): void {
|
|
|
// get all quotas
|
|
// get all quotas
|
|
|
if ($GLOBALS['debug'] == true) {error_log("Getting Quota Stats"); }
|
|
if ($GLOBALS['debug'] == true) {error_log("Getting Quota Stats"); }
|
|
|
- exec("sudo xfs_quota -x -c 'report -u' /home | tail -n +7 | column -t -n quota -N user,used,soft,hard,limit,grace -H 5 -J 2>&1", $userOutput, $userReturnCode);
|
|
|
|
|
|
|
+ exec("sudo /usr/sbin/xfs_quota -x -c 'report -u' /home | tail -n +7 | column -t -n quota -N user,used,soft,hard,limit,grace -H 5 -J 2>&1", $userOutput, $userReturnCode);
|
|
|
if ($userReturnCode !== 0) {
|
|
if ($userReturnCode !== 0) {
|
|
|
error_log("getstats: ERROR: Getting Quota Stats failed, details => " . implode("\n", $userOutput));
|
|
error_log("getstats: ERROR: Getting Quota Stats failed, details => " . implode("\n", $userOutput));
|
|
|
http_response_code(500);
|
|
http_response_code(500);
|