467,212 Members | 1,199 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,212 developers. It's quick & easy.

opendir() in safe mode

What do I need to change to use the opendir() function when safe mode is
in affect??
I have root access to the server and can make any changes neccessary
except turn safe mode off

Thanks in advance,
Jeremy
Jul 17 '05 #1
  • viewed: 4123
Share:
3 Replies
Jeremy Shovan wrote:
What do I need to change to use the opendir() function when safe mode is
in affect??
I have root access to the server and can make any changes neccessary
except turn safe mode off

Thanks in advance,
Jeremy


who is the owner of the web server process? I could be wrong, but make
sure the process owner has access to the directory you are trying to
open. (ie in the same group, etc...)

(but I am not wrong: see:

go to the PHP site and search for "safe mode opendir" in the "online
docs"

and you will find:

http://www.php.net/rmdir
.....
"Note: When safe mode is enabled, PHP checks whether the directory in
which you are about to operate has the same UID (owner) as the script
that is being executed."

Michael Austin.
Jul 17 '05 #2
Michael Austin wrote:
Jeremy Shovan wrote:
What do I need to change to use the opendir() function when safe mode
is in affect??
I have root access to the server and can make any changes neccessary
except turn safe mode off

Thanks in advance,
Jeremy

who is the owner of the web server process? I could be wrong, but make
sure the process owner has access to the directory you are trying to
open. (ie in the same group, etc...)

(but I am not wrong: see:

go to the PHP site and search for "safe mode opendir" in the "online
docs"

and you will find:

http://www.php.net/rmdir
....
"Note: When safe mode is enabled, PHP checks whether the directory in
which you are about to operate has the same UID (owner) as the script
that is being executed."

Michael Austin.


Thanks for the reply. I understand that much but my problem is that I
need scripts with different uid's to access the directory that I am
opening. The code is used with several sites on the server. I read the
documentation already but I dont quite understand what to do. I set the
safe_mode_include_dir and safe_mode_exec_dir in the php.ini file but
that didn't work.

Jeremy
Jul 17 '05 #3
Jeremy Shovan wrote:
Michael Austin wrote:
Jeremy Shovan wrote:
What do I need to change to use the opendir() function when safe mode
is in affect??
I have root access to the server and can make any changes neccessary
except turn safe mode off

Thanks in advance,
Jeremy


who is the owner of the web server process? I could be wrong, but make
sure the process owner has access to the directory you are trying to
open. (ie in the same group, etc...)

(but I am not wrong: see:

go to the PHP site and search for "safe mode opendir" in the "online
docs"

and you will find:

http://www.php.net/rmdir
....
"Note: When safe mode is enabled, PHP checks whether the directory in
which you are about to operate has the same UID (owner) as the script
that is being executed."

Michael Austin.

Thanks for the reply. I understand that much but my problem is that I
need scripts with different uid's to access the directory that I am
opening. The code is used with several sites on the server. I read the
documentation already but I dont quite understand what to do. I set the
safe_mode_include_dir and safe_mode_exec_dir in the php.ini file but
that didn't work.

Jeremy


try putting the UID's and directories in the same group (btw, I am
"assuming" that this is Unix/Linux) chgrp dir <group of UID> and setting
the protections to 664 or 764 or 774... using chmod.
||+--> World Privilege
|+---> Group Privilege
+----> Owner Privilege
7 = rwx
6 = rw-
5 = r-x
4 = r--
3 = -wx
2 = -w-
1 = --x
0 = ---
Michael Austin.
Jul 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Giobibo | last post: by
reply views Thread by Yemi | last post: by
2 posts views Thread by Paul Schmidinger | last post: by
2 posts views Thread by Joseph S. | last post: by
1 post views Thread by Sephi | last post: by
5 posts views Thread by rdlowrey | last post: by
7 posts views Thread by bvdp | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.