Page 1 of 1

Permission Problem

Posted: Wed Jun 11, 2003 6:24 pm
by Antitrust
When a user uploads a gallery, a new directory is created using the mkdir() command. After that, I am [trying] to upload each file that they want in the gallery to that directory. This is all being executed in the same run by the same script. I use move_uploaded_file() to move each uploaded file to the folder.

Here's the problem: I am getting a UID error with Safe Mode on - this is a must. Here's the error:
SAFE MODE Restriction in effect. The script whose uid is 512 is not allowed to access [folder info removed] owned by uid 48 in [script info removed] on line 94
The permissions of the folder created are 0755. Does anyone know of a fix here? Or any ideas?

Thanks in advance.

Posted: Thu Jun 12, 2003 2:16 am
by cactus
As a guess, if your using Apache then you need to chown the directories you create to the same user as the Apache process.

It's not PHP that writes the file to the directory it's the Apache process, you could chown the dir's to 777, which may fix your issue.