Re: [PHP-WIN] Folder permissions required to create/copy files in/into it during PHP script/code execution?

[email protected] ("Jacob Kruger") Wed, 21 Aug 2013 17:34:55 +0200
Newsgroups php.windows
Message-ID <70190201394C43479B5420F989E6B0C7@JacobPC>
Ok, might have now fixed this - firstly set folder permissions to 777, but, 
then, again, turned off public execute permissions, which seemed to revert 
permissions to 776, but, creating the text file, using the test script still 
worked - but, still just wondering what the specific permission 
difference/recommendation is/should be?

Stay well

Jacob Kruger
Blind Biker
Skype: BlindZA
'...fate had broken his body, but not his spirit...'

----- Original Message ----- 
From: "Jacob Kruger" <[email protected]>
To: <[email protected]>
Sent: Wednesday, August 21, 2013 5:05 PM
Subject: [PHP-WIN] Folder permissions required to create/copy files in/into 
it during PHP script/code execution?


I have got a /images folder, and I want to sometimes copy uploaded files 
from the temp path - using their temp_name file names, which works for other 
things, to then copy them into this folder in the root of the website, and 
renaming them at the same time to a name based on time() . rand(1, 10), etc.

Now the file name generation works well enough, but, seems like no matter 
what permissions I set for that folder, for group, owner and public, where 
have even tried turning on all 3 of read, write and execute, using 
fileZilla - current permissions value ends up rendering as 766 - am guessing 
that 6 = rwe, but not ownership? - but, can't copy the files in there at 
runtime, and when also tried creating a test script, to just create a text 
file in that folder, and write to it, get same error message in server log:

PHP Warning:  copy(../images/13770956916.png): failed to open stream: 
Permission denied

and

failed to open stream: Permission denied

Is this possibly to do with it being a linux server, running Apache 2.0, or, 
the name of the folder /images, or am I missing something 'obvious' here?

TIA, for any thoughts/ideas on what to try change

Jacob Kruger
Blind Biker
Skype: BlindZA
'...fate had broken his body, but not his spirit...'