By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,722 Members | 1,874 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,722 IT Pros & Developers. It's quick & easy.

opendir() in safe mode

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
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

P: n/a
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.