View Full Version : Need a control panel option to enable/disable Safe Mode
hostpc.com
11-19-2003, 06:22 AM
With the most recent upgrade, safemode was automatically enabled for all sites. This causes MAJOR problems for clients scripts that weren't expecting a change.
It causes an equally major problem for me, as I don't want my techs to have access to root to change to open_basedir or remove safe mode restrictions, and currently, thats the only way it can be done (I think).
A control panel option to enable/disable safe mode & open_basedir is desperately needed, if only from the admin login.
We need to implement something like this soon. Manually editing 500 sites (or every site with Invision PB, Menalto Gallery, etc.) isn't an option. Any ideas?
DirectAdmin Support
11-19-2003, 08:59 AM
Hello,
I made a post on how to turn it off for all sites:
http://www.directadmin.com/forum/showthread.php?s=&threadid=873
John
BugLight
11-21-2003, 04:50 PM
I notice in your templates that you customize them at templating time with variables, like:
<Directory |DOCROOT|>
Options +Includes -Indexes
php_flag engine |PHP|
php_admin_value safe_mode 1
</Directory>
Is there anywhere in a domain's configuration that we can specify our own variables? For instance:
PHP_SAFE_MODE=(1 or 0)
Then change our template to:
<Directory |DOCROOT|>
Options +Includes -Indexes
php_flag engine |PHP|
php_admin_value safe_mode |PHP_SAFE_MODE|
</Directory>
Then when a re-templating task hits we retain the configured value.
DirectAdmin Support
11-21-2003, 11:24 PM
Hello,
For 1.20.2 I've actually taken the open_basedir and safe_mode out. Unfortunately it was causing major problems for many people and we were getting many support requests for broken sites.
If you want safe_mode and/or open_basedir, you can use the "custom httpd.conf" feature as it's *very* easy to add those features to a site, but as this thread has pointed out, quite difficult to remove them.
If you liked how it was, you are free to copy the templates over to the custom directory and modify them to your hearts content :)
On a seperate note, more in replying to what you're doing with safemode (actually this would have worked before, but I'll explain anyway) have a virtual_host template like the following:
|?PHP_SAFE_MODE=1|
<VirtualHost ...>
|CUSTOM|
.....
php_admin_value safe_mode |PHP_SAFE_MODE|
.....
</VirtualHost>
Now, since we have the custom httpd.conf feature, we can insert whatever we want into the |CUSTOM| token... so, in the custom httpd.conf tool, just add
|?PHP_SAFE_MODE=0| Which will override the "0" because it's set after the first one.. and safe_mode will then be shut off.
This lets you have it on for all domains, and then shut it off for whatever domains you want. :)
John
Powered by vBulletin™ Version 4.0.4 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.