Directory Creation Problem

See all posts See thread Reply

Re: Directory Creation Problem new!
by Steve, 18 years ago
Try chmod 0777 directory where you actually execute the code of upload.php.Reply
Re: Directory Creation Problem new!
by Speshdiv, 17 years, 10 months ago
I have a solution for this issue. I also had this error. You can only delete the locked files using Linux commands via SSH.

The thing you've got to do is this: disable these in both class.upload.php and upload.php:

$this->dir_auto_create   = false;    
$this->dir_auto_chmod    = false;    
$this->dir_chmod         = false;

If you follow my solution, you don't let the script generate your folders. You create your own, using these commands, just after the <?php of upload.php

$folderName = $_POST["folderName"];
$foo='../YourFolder/'.$folderName.'/';
$old_umask = umask(0);
mkdir($foo,0777);
umask($old_umask);

$folderName is a variable you post from the form Process('../YourFolder/'.$imageName.'');

You'll see that the directories and files you create are completely writeable. Maybe this is a nice thing to include with the oncoming version?

Greetings!Reply
Re: Directory Creation Problem new!
by colin, 17 years, 10 months ago
Thanks for the analysis and solution. I will do some test, and see what I can change in the class.Reply