Re: file upload problem

From: Date: Thu, 18 Oct 2001 12:58:03 +0000
Subject: Re: file upload problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-71478@lists.php.net to get a copy of this message
I've run into the same problem, I had to 'chmod 777 images' to be able to create dirs or files, which is BAD security! Brian Aitken wrote:
Hiya I promise I won't keep perstering you after this question :-) My problem is this - I've got a complete system that works perfectly on Linux but I've got to set it up on a new server that's running Windows. When I try to handle file uploads I get errors (when the same code worked perfectly under Linux). When I try to use mkdir like this: $name4loc = urlencode($mname); $loc = "./images/$name4loc"; mkdir("$loc",0777); I get the error: Warning: MkDir failed (Permission denied) in D:\Inetpub\wwwroot\HATII\admn\php\moss\mregdone.php on line 98 When I try to copy a file like this: if (!copy ($test, $test_name)) echo("Problem: Unable to copy image. <br>Please try again."); exit; } I get the error: Warning: Unable to create 'vinlogo.jpg': Permission denied in D:\Inetpub\wwwroot\HATII\admn\php\a2paw\uptestdone.php on line 41 I'm guessing PHP is somehow lacking permission to write to the file system but the technicians have tried changing the file permission for the directory I'm trying to write to and the same error is given. We don't know what else to do. Any ideas? Thanks Brian


« previous php.general (#71478) next »