This is a discussion on Limiting access to upload area within the PHP Language forums, part of the PHP Programming Forums category; The Why: I'm in the process of creating a Linux+Apache+PHP website with a public area and an ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
The Why:
I'm in the process of creating a Linux+Apache+PHP website with a public area and an admin area for configuration and updates. The What: One of the features of the admin area is image-upload, where the images are subsequently viewably by the general public. Currently I've created a dedicated "pictures" directory which world-writable into which the PHP script puts the form-uploaded images. The admin logging in is done via a database lookup, not .htaccess directives or OS permissions. The How: It seems a bit risky (is it?) to have to directory so open, is there a way I can allow the script to move files into that directory without making it a+w? Thanks, Mark |
|
|||
|
There's always concern when you have a generic upload area;
but only authenticated admins can upload the images, right, not the general public? Why does the directory have to be world writeable? It only has to be writeable by the Apache user, right? Kurt Mark Hanford wrote: > The Why: > I'm in the process of creating a Linux+Apache+PHP website with a > public area and an admin area for configuration and updates. > > The What: > One of the features of the admin area is image-upload, where the > images are subsequently viewably by the general public. Currently > I've created a dedicated "pictures" directory which world-writable > into which the PHP script puts the form-uploaded images. The admin > logging in is done via a database lookup, not .htaccess directives or > OS permissions. > > The How: > It seems a bit risky (is it?) to have to directory so open, is there a > way I can allow the script to move files into that directory without > making it a+w? > > Thanks, > > Mark |