Limiting access to upload area

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mark Hanford

    Limiting access to upload area

    The Why:
    I'm in the process of creating a Linux+Apache+PH P 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
  • Kurt Milligan

    #2
    Re: Limiting access to upload area

    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:[color=blue]
    > The Why:
    > I'm in the process of creating a Linux+Apache+PH P 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[/color]

    Comment

    Working...