Is it a good idea to project directories such as /images?

Discussion in 'Apache' started by dill, Feb 23, 2007.

  1. #1
    Is their any benefit to password protecting your directories that you don't specifically intend visitors to view, such as /images?
     
    dill, Feb 23, 2007 IP
  2. ThreeGuineaWatch

    ThreeGuineaWatch Well-Known Member

    Messages:
    1,489
    Likes Received:
    69
    Best Answers:
    0
    Trophy Points:
    140
    #2
    You can switch off directory browsing per directory in httpd.conf, or use a .htaccess file to deny. Or even just 'touch index.html' in the images directory to give a blank index file (and therefore making the directory unviewable.)

    If you have something there that you'd prefer users not to see then it is a good idea. Then again, perhaps you shouldn't be storing files that you do not want anyone to see below your DOCUMENT_ROOT? :D
     
    ThreeGuineaWatch, Feb 23, 2007 IP
  3. dill

    dill Peon

    Messages:
    51
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks for the tips.

    Are there any concerns from security perspective (i.e. hacking, not privacy)?
     
    dill, Feb 23, 2007 IP
  4. ThreeGuineaWatch

    ThreeGuineaWatch Well-Known Member

    Messages:
    1,489
    Likes Received:
    69
    Best Answers:
    0
    Trophy Points:
    140
    #4
    Not for image directories. But you should ensure appropriate security is applied to files and directories containing scripts and script includes as these are more likely to hold sensitive data like db connection strings (with passwords in them etc.)
     
    ThreeGuineaWatch, Feb 24, 2007 IP
  5. inworx

    inworx Peon

    Messages:
    4,860
    Likes Received:
    201
    Best Answers:
    0
    Trophy Points:
    0
    #5
    .htaccess is mostly used to protect a folder dontaining sensitive information and a blank index.html is sufficient for any other directories...
     
    inworx, Feb 27, 2007 IP
  6. Sini

    Sini Peon

    Messages:
    119
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #6
    You can't password protect folders from where content is shown on any public website as visitors would be promted to login screen instead of displaying an image for example.
     
    Sini, Feb 27, 2007 IP