When i allow a virtual admin to edit things like php values, he can override the global limits i have set. For example i limited PHP memory to 32 MB but allowed him to change php settings for his domain - hes than able to set more than 32 MB als a memory limit. It would be great if he could change the memory limit UP TO the global limit i have set. so he can give 8mb limit to his domais or 16 mb but never more than 32MB.

Thanks

Status: 
Closed (fixed)

Comments

I assume you are setting the global limits in /etc/php.ini ? If so, you can in Virtualmin set limits that will apply to all processes the user runs, including PHP. This can be done at Administration Options -> Resource Limits.

Alternately, you can prevent users from editing their own php.ini files, at System Settings -> Server Templates -> Default Settings -> Administrator's Webmin modules , by changing "PHP Configuration" to "No".

Im pretty sure i have set this to 32MB - i know i came across this setting. Unfortunattly i can t find it any more :) But i think this setting is overwriten if a user is able to change his php settings - thats what i said - i think the limit is not honored.

If you have the memory resource limit set to 32M, the PHP setting won't actually override it. The PHP limit is enforced only by PHP itself, while the one on the Resource Limits page is enforced by the operating system.

Ok - that means the phpinfo shows 64? where the os limits kill everything beyond 32MB?

Yes, that is correct.

Ok - thanks - seems a bit confusing to end users when they dont know they have a set limit and their PHP.ini set limit doesnt work :)

But i think its acceptable.

Thanks and solved i guess

The Resource Limits setting is actually more wide-ranging that PHP, as it applies even to commands users run when they SSH in, and to CGI scripts.. that's why it is separate.

Automatically closed -- issue fixed for 2 weeks with no activity.