+ Reply to Thread
Results 1 to 9 of 9

Thread: Protect a directory..?

  1. #1
    mikel2k3 is offline x10 Lieutenant mikel2k3 is an unknown quantity at this point
    Join Date
    Aug 2005
    Location
    West Yorkshire - UK
    Posts
    374

    Protect a directory..?

    Right, just a quick question that will probably have a quick answer.

    Looked on google, but thought I would get a more straight forward answer here.

    I want to stop direct access to a folder on one of my clients websites.
    But I still want the files to be accessed when given a direct link to them.


    I think there used to be something on cpanel that does this, but last time i remember trying it, it also blocked direct access to the files.


    It doesnt have to be password protected or anything, just a forbidden page will do for me.


    Cheers,
    Mike



    :::::EDIT::::::

    Nevermind, think ive sorted it.
    I just changed the File Attributed of the folder so that the Public can only Execute, but not Read or Write.
    Is this right?


    Mike
    Last edited by mikel2k3; 09-09-2008 at 12:42 PM.
    -----------------------------------
    -----------------------------------

    http://www.DistrasDesigns.com

    -----------------------------------
    -----------------------------------

  2. #2
    ThePBgod is offline x10Hosting Member ThePBgod is an unknown quantity at this point
    Join Date
    May 2008
    Posts
    34

    Re: Protect a directory..?

    This may not be your best solution. But a simple index.html file can be loaded to the directory you wish not to be viewed. They will see this index page, and not the files in that directory.

  3. #3
    tonykgv is offline x10Hosting Member tonykgv is an unknown quantity at this point
    Join Date
    May 2008
    Posts
    17

    Re: Protect a directory..?

    Why don't you just put a password on the directory?

  4. #4
    sunils's Avatar
    sunils is offline x10 Spammer sunils is an unknown quantity at this point
    Join Date
    Jan 2008
    Location
    Chennai ,India
    Posts
    2,264

    Re: Protect a directory..?

    /***************Moving to off Topic Section*********/

    Reason:- Doesn't fit in any section.
    [LEFT][B]Sunil Sankar
    -------------------------------------------------------------------------

  5. #5
    REBEL21's Avatar
    REBEL21 is offline x10 Lieutenant REBEL21 is an unknown quantity at this point
    Join Date
    Aug 2008
    Location
    ireland
    Posts
    355

    Re: Protect a directory..?

    You can protect directorys and stop unauthorised use in cpanel just click on password protect directories

  6. #6
    mikel2k3 is offline x10 Lieutenant mikel2k3 is an unknown quantity at this point
    Join Date
    Aug 2005
    Location
    West Yorkshire - UK
    Posts
    374

    Re: Protect a directory..?

    last time i tried that, you had to put a password in to view anything on the site.

    Such as, if you password protected an 'images' folder, no images would work on a website unless you knew the password.

    Chaning the permissions manually seems to of worked.
    Or like tonykgv said to just put an index.html file there.
    -----------------------------------
    -----------------------------------

    http://www.DistrasDesigns.com

    -----------------------------------
    -----------------------------------

  7. #7
    GBH187 is offline x10Hosting Member GBH187 is an unknown quantity at this point
    Join Date
    May 2008
    Location
    Victoria, Australia
    Posts
    58

    Re: Protect a directory..?

    put a simple index.html or change the web server config to not list directory contents

  8. #8
    Zangetsu's Avatar
    Zangetsu is offline x10 Lieutenant Zangetsu is an unknown quantity at this point
    Join Date
    Mar 2008
    Location
    somewhere out there
    Posts
    491

    Re: Protect a directory..?

    or you could edit the .htaccess file and Type "Deny from All" without quotation marks presuming you have an .htaccess file
    please help me out and register Here


    :hsughr:This section is in need of attention from an expert on the subject.:hsughr:

  9. #9
    cowctcat's Avatar
    cowctcat is offline x10 Lieutenant cowctcat is an unknown quantity at this point
    Join Date
    Nov 2007
    Location
    In front of a computer
    Posts
    401

    Re: Protect a directory..?

    All you would have to do is turn off indexing for that folder in cpanel with the index manager
    Last edited by cowctcat; 09-13-2008 at 03:39 PM.
    --cowctcat

+ Reply to Thread

Similar Threads

  1. Introduction to Linux CLI
    By HomerJ in forum Tutorials
    Replies: 3
    Last Post: 02-26-2008, 08:53 AM
  2. How to protect images without htaccess using PHP
    By frznmnky in forum Tutorials
    Replies: 0
    Last Post: 12-26-2007, 11:51 AM
  3. pass wording a directory
    By NeonWarrior in forum Free Hosting
    Replies: 4
    Last Post: 11-14-2007, 02:54 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers