At 5:11 PM -0600 5/17/06, Brady Mitchell wrote:
 > "chmod() can only change the permissions of files that are owned by
 the user running the command. In most cases, this is the user that
 the web server runs on."

 That confuses me, because who's the user here? Is it just the system
 administrator or the application?

This is the user that Apache (or whatever webserver) is running as.  If
you're using Apache, look at your httpd.conf file to find out who that
user is.  If you're creating files successfully, you can just look at
the owner of that file to find out who it is.

Is safe_mode enabled?

 >From the manual (http://us3.php.net/chmod):


In my code, I use:

ini_set( 'safe_mode', '0' );

Which I think disables "safe_mode" and from what I've read, the default is off and in my phpinfo, it says it's 'off" -- so I think it's off. :-)

Note:  When safe mode is enabled, PHP checks whether the files or
directories you are about to operate on have the same UID (owner) as the
script that is being executed. In addition, you cannot set the SUID,
SGID and sticky bits.

I understand that, except for the sticky bits -- I don't know what they are, but will look them up later.

But safe_mode is off, so any application should be able to chmod(), right?

However, when my application tries to change permissions via chmod(), it fails and generates a warning.

BUT -- considering that this is a permission issue and not a php one, as I've been told, I'll end this thread and look elsewhere for an answer.

Thanks.

tedd
--
------------------------------------------------------------------------------------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to