[H-GEN] file ownership problem

Paul Clarke paul at qfm.org.au
Wed Aug 27 16:23:39 EDT 2003


[ Humbug *General* list - semi-serious discussions about Humbug and     ]
[ Unix-related topics. Posts from non-subscribed addresses will vanish. ]

Thanks Anthony, your spot on! I compared some stuff on my local server
(debian) to the rackshack server (redhat??) and:

On the rackshack server phpinfo() shows that for the safe_mode directive
the master value is off but the local value is on, on my local server
both are off.

So to find where they switched the local value on... The 2 configuration
files I have looked at are /etc/php.ini and /etc/httpd/conf/httpf.conf
(rackshack paths, slightly different on the debian build but I can
accept that)

the php.ini files are the same with both having "safe_mode = off"

In the httpd.conf files the only difference to safe_mode was in the
rackshack file which has the following lines:

<ifDefine vwh_php4_module>
Php_admin_flag safe mode on
</ifDefine>

Is this where they have changed the local value of the safe_mode
directive?

If so, if I rem out that line and restart the server it should let me
access the files. Is this the best way to do this?

Obviously they put the directive there for a reason. Am I better to set
safe_mode off in the code or in a .htaccess file for each site?
(although I will need to do this for all sites anyway)

I am expecting that this can not be done as it means that any admin of a
virtual site and override the setting made by the server admin, if this
presumption correct?

Thanks

Paul.

-----Original Message-----
From: Majordomo [mailto:majordom at caliburn.humbug.org.au] On Behalf Of
Anthony Irwin
Sent: Wednesday, 27 August 2003 4:23 PM
To: general at lists.humbug.org.au
Subject: Re: [H-GEN] file ownership problem


[ Humbug *General* list - semi-serious discussions about Humbug and
]
[ Unix-related topics. Posts from non-subscribed addresses will vanish.
]

Paul Clarke wrote:
> Warning: SAFE MODE Restriction in effect. The script whose uid is 518 
> is not allowed to access /usr/share/sd/_sdprectrl.php owned by uid 0 
> in Unknown on line 0
>
> What is the solution? (in simple terms as I am very new to this)

Hi,

By default when php is set to safe mode it will only open files if they
have the same UID you can change safe_mode_gid to on to allow php to
open files with the same GID. You could also set safe_mode to off and
then it won't do any checking and run the files.

UID stands for user id and GID stands for group id.

You change the safe_mode or safe_mode_gid settings in the php.ini file
which is normally located somewhere in /etc


Kind Regards,
Anthony Irwin


--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'.  See http://www.humbug.org.au/



More information about the General mailing list