On 29/10/2005, "Ondra Kudlik" <[EMAIL PROTECTED]> wrote:
>Sat, Oct 29, 2005 ve 11:21:54PM +0100, Andrew Alderwick napsal:
>> [...] Am I missing something?
>
>Yeah :) Apache user has sufficient privileges, but...
>[...]
Thanks for that, Ondra! I see now.
+ // we must set umask, because it override mkdir mode
+ $oldumask = umask(0077);
+ if (!fs_exists($partial_path) && !mkdir($partial_path, 0700)) {
+ umask($oldumask); // set it back
+ return false;
+ }
+ umask($oldumask); // set it back
I only have an objection to setting the umask unnecessarily when
$partial_path exists. Maybe the following would be more efficient:
+ // we must set umask, because it override mkdir mode
+ if (!fs_exists($partial_path)) {
+ $oldumask = umask(0077);
+ $mkdir_okay = mkdir($partial_path, 0700);
+ umask($oldumask); // set it back
+ if (!$mkdir_okay) return false;
+ }
Cheers
Andy
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Ilohamail-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ilohamail-devel