Folder permissions required to create/copy files in/into it during PHP script/code execution?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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...'

[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux