Disable PHP Configuration for Users

Hi, It is Importnt for me to disable the PHP5 Configuration Option for Users. I use a Pro Licence. But I can#t find an option to make this.
Someone with the same Problem and maybe a reason?

Thanks, Pierre

Hrm, I’m not seeing an option for disabling that either!

Which means it’s either hiding somewhere, or there isn’t one. Either of which Jamie can help us with :slight_smile:

What I’d do is pop a message into the Bugs and Issues tracker, and Jamie will either point you to it, or look into making such an option if it doesn’t already exist.

Thanks for the answer, I make a Message in the Bug and Issuses Tracker.

Ok, her ist the post: http://www.virtualmin.com/index.php?option=com_flyspray&Itemid=82&do=details&task_id=4990&Itemid=82&project=1

I think its importent too, to give the users a backupoption.

the option btw is in server template - apache website
Allow editing of PHP configuration? Yes No

Thanks, I change the option in the Server Template, bau ther are User 3 Accounts and If i log in in one of them I can see the option undr Sevices. Did I forget something?

Im not sure for existing domains.
You could go to edit virtual server, select the template where you disabled the option if needed and click save.
It might reload the template with the preferred option disbaled.

Else make the file immutable as explained above. they can see but cant touch :wink:

there is a long thread about this in this forumpart.
In the template you can choose to let users modify the php.ini or not.
when not then the file belongs to root and users can’t edit.

However they have the rights to rename the file and recreate a new php.ini.
Therefore you should chatter =i the ini files and folders too!

you can make a immutable.sh in the root containing

cd /home ; find -type f -name php.ini -maxdepth 4 | awk {'print "chattr +i "$1'} |sh cd /home ; find -type d -name etc -maxdepth 2 | awk {'print "chattr +i "$1'} |sh cd /home ; find -type f -name php5.fcgi | awk {'print "chattr +i "$1'} |sh cd /home ; find -type d -name fcgi-bin -maxdepth 2 | awk {'print "chattr +i "$1'} |sh
and then a undo_immutable.sh with
cd /home ; find -type f -name php.ini -maxdepth 4 | awk {'print "chattr -i "$1'} |sh cd /home ; find -type d -name etc -maxdepth 2 | awk {'print "chattr -i "$1'} |sh cd /home ; find -type f -name php5.fcgi | awk {'print "chattr -i "$1'} |sh cd /home ; find -type d -name fcgi-bin -maxdepth 2 | awk {'print "chattr -i "$1'} |sh