Welcome to the JaguarPC Community
JaguarPC
Sales: (888) 338-5261
Support: (888)-551-3050
Results 1 to 5 of 5

This is a discussion on Need help in the Open Discussion & Chit-chat forum
My site requires that images get uploaded. In order to do this, I have to set the permissions to 777 for the upload directory. This ...

  1. #1
    JPC Member
    Join Date
    Oct 2001
    Posts
    27

    Need help

    My site requires that images get uploaded. In order to do this, I have to set the permissions to 777 for the upload directory.

    This directory seems to be getting "hit" lately. This did not start until maybe a couple of months ago.

    Does anyone have any ideas on how to prevent this?
    Thanks,
    Mark

  2. #2
    || $name ne 'R.Stiltskin'
    Join Date
    Jun 2003
    Location
    Tejas
    Posts
    2,438
    What do you mean by "hit", exactly. Do you mean you have a publicly accessible directory that requires very loose permissions and that now the directory is returning the images to all GETs that ask for them? And that there was a sudden and now continuous spike in requests for the images in that directory?

    If you are serving files from that directory and it is in unprotected web space, you cannot stop requests. Or if you need to, you'll need to explain your situation a bit more on what kind of help you want, specifically. Depending on your specific situation, some suggestions will be better than others and some won't apply at all. Need more info.
    Last edited by Spathiphyllum; 03-09-2006 at 09:53 PM. Reason: I'm wont to forget an apostrophe on occasion.

  3. #3
    JPC Member
    Join Date
    Oct 2001
    Posts
    27

    What I mean by hit

    Unauthorized uploads.

  4. #4
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    6,003
    I would password protect the script that lets users upload files. The easiest way to do this is with the Password Protected Directories feature of CPanel, but there are ways to do it on individual files if protecting the entire directory is not possible (because other scripts in it need to be public, etc.

    Another thing: make sure you are checking any files that are uploaded to be sure they are what you expect. It is not unheard of for people to try uploading scripts (especially PHP scripts) to servers in the hope of exploiting them. Basically they figure out that www.somesite.com/imguploads is where uploaded files are stored and then they try to upload a file like spamtheworld.php. If they're successful they can go to http://www.somesite.com/imguploads/spamtheworld.php and essentially do whatever they want, and it looks like its you that's doing it.

    --Jason
    Jason Pitoniak
    Interbrite Communications
    www.interbrite.com www.kodiakskorner.com

  5. #5
    || $name ne 'R.Stiltskin'
    Join Date
    Jun 2003
    Location
    Tejas
    Posts
    2,438
    humarsoft,

    Besides Basic or Digest Authorization suggested by jason, you might also consider writing or searching for a script that runs as a cron job whereby anything that is not an image file or apache config file gets purged at regular intervals. That way you'll have a strict "policeman" on watch to purge the directory of any executable files. Should a rogue script get uploaded, at least its damage will be minimized and you won't have to scan the directory every few minutes out of paranoia.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •