Originally Posted by
paulm
Do you use the umask function before trying to create the directory?
Of course I use the umask function - although I knew up front that it wasn't going to help in my case:
PHP Code:
$copyfile_errmsg = "Can't copy " . $origin_filename . " to " . $temp_filename;
umask(0000);
copy($origin_filename, $temp_filename) or die($copyfile_errmsg);
IMHO, the problem has to do with the PHP script running under the PHP session, which is not the same as the owner of the Zen Cart directories. This is understandable and good for security purposes.
However, what I don't understand is how that mkdir(DIR_FS_DOWNLOAD_PUBLIC . $tempdir, 0777) manages to succeed in creating that $tempdir... Are the permission rules different for creating directories vs. creating files?
Bookmarks