Does ISPC support per user inodes quota? Quota system is in place, but file counts set to infinity: Code: quota -u web297 Disk quotas for user web297 (uid 1082): Filesystem blocks quota limit grace files quota limit grace /dev/sda1 2291820 5242880 5243904 16006 0 0
Ok, I have found plugin witch sets quota periodically: /usr/local/ispconfig/server/lib/classes/cron.d/100-monitor_hd_quota.inc.php There is line: Code: $app->system->exec_safe('setquota -u ? ? ? 0 0 -a &> /dev/null', $username, $blocks_soft, $blocks_hard); It sets 0 0 for inode limit. I guess I should update script by adding inode previous values. The question: Where should I modify this code: on master server or on slaves?
Finally, modified 3 files to get inode functionality. Basically my flow was: 1. Set inode limits for all users; 2. Then on quota update cron I read previously set inode limits and re-set it, to avoid reset back to 0; Attached 3 files archive from '/usr/local/ispconfig/server/plugins-available' for anyone facing same problem, and maybe for Till to implement inodes support Code modified/added: PHP: $inodes = $app->system->exec_safe('quota -u ?', $username); $lines = array_filter(array_map('trim', explode("\n", $inodes))); // Skip header lines and find the data line foreach ($lines as $line) { // Skip lines that are headers or empty if (strpos($line, 'Filesystem') !== false || strpos($line, 'Disk quotas') !== false) { continue; } // Parse the actual quota line $parts = preg_split('/\s+/', $line); // Log for debugging $app->log('Quota parts: ' . print_r($parts, true), LOGLEVEL_DEBUG); // Typical quota output format: // Filesystem blocks quota limit grace files quota limit grace // parts[0] parts[1] parts[2] parts[3] parts[4] parts[5] parts[6] parts[7] parts[8] if (count($parts) >= 7) { $inode_soft = $parts[5]; // Soft limit $inode_hard = $parts[6]; // Hard limit break; } } $app->system->exec_safe('setquota -u ? ? ? ? ? -a &> /dev/null', $username, $blocks_soft, $blocks_hard, isset($inode_soft) ? $inode_soft : 0, isset($inode_hard) ? $inode_hard : 0); P.S. User / group quota not deleted after user removal. A bug of ISPC. Massive number of dormant quota entries.