Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2008

    how to pwd protect directories with out cpanel ?

    how to pwd protect directories with when using no control panel, I am planning to change the login details of the protected directories every few days as well as its top secret data, so I would like to know how to protect directories with pwd, I know how to do using control panel such as cPanel r Plesk but I am having no control panel at this interface

    I intend to share the files under this protected directories only to my team, so plz help me with codes if there are any

    its cent 0s5, apache handler

  2. #2
    Join Date
    May 2003
    You may find this guide useful for password protecting directories;

  3. #3
    Join Date
    Jul 2009
    You can use .htaccess in order to secure it. Here is an example:

    AuthName "Secure Area"
    AuthType Basic
    AuthUserFile /path/to/your/directory/.htpasswd
    require valid-user

    you will have to modify the above according to your situation. In particular, change:

    1. AuthName

    Change "Secure Area" to any name that you like. This name will be displayed when the browser prompts for a password. If, for example, that area is to be accessible only to members of your site, you can name it "Members Only" or the like.

    2. AuthUserFile

    You will create a file containing passwords named .htpasswd later. The "AuthUserFile" line tells the Apache web server where it can locate this password file.

    Ideally, the password file should be placed outside any directory accessible by visitors to your website. In that case there are no chances that your visitors can view the .htpasswd contents by simply typing

    Wherever you decide to place the file, put the full path of that file after "AuthUserFile". For example, if the directory where you placed the file is /home/your-account-name/.htpasswd, modify that name to "AuthUserFile /home/your-account-name/.htpasswd". Note that your password file need not be named .htpasswd either. It can be any name you wish. For ease of reference, however, this tutorial will assume that you chose ".htpasswd".

    Set Up the Password File, .htpasswd

    htpasswd -c .htpasswd your-user-name

    where your-user-name is the login name of the user you want to give access.

    The user name should be a single word without any intervening spaces. You will then be prompted to enter the password for that user. When this is done, the htpasswd utility creates a file called .htpasswd in your current directory (home directory). You can move the file to its final location later, according to where you set the AuthUserFile location in .htaccess.

    If you have more than one users, you should create passwords for them as well, but using the following command for each subsequent user:

    htpasswd .htpasswd another-user-name

    If you are curious about the contents of the file, you can take a look using the following command:

    cat .htpasswd

    Since the .htpasswd file is a plain text file, with a series of user name and encrypted password pairs, you might see something like the following:


    you should make sure that permissions on the file are acceptable (644 or 755)
    In any case, the passwords are encrypted, so a cursory glance at the file will hopefully not give away the passwords.

    Remember that your file does not even have to be called .htpasswd. You can name it anything you like. However, if you do, make sure that your AuthUserFile has the same directory and filename or Apache will not be able to locate it

  4. #4
    Join Date
    Jun 2008
    Light travels faster thn sound.This is why some people look bright until you actually hear them speak

  5. #5
    Join Date
    Aug 2004
    htaccess will help you out check this url : | IT Server Tutorials For Dummies

Similar Threads

  1. How to password protect web pages, i can protect directories but can't put pages in.
    By philip2006 in forum Hosting Security and Technology
    Replies: 4
    Last Post: 03-04-2007, 09:13 AM
  2. "Password Protect Directories" Cpanel
    By HD Fanatic in forum Hosting Security and Technology
    Replies: 3
    Last Post: 11-12-2005, 04:47 PM
  3. Web Protect cPanel
    By nwc in forum Programming Discussion
    Replies: 0
    Last Post: 08-24-2005, 12:34 AM
  4. Plesk 7.5 - password protect subdomain directories
    By pcroft in forum Hosting Software and Control Panels
    Replies: 0
    Last Post: 02-08-2005, 11:56 AM
  5. Programs to protect directories??
    By WP1 in forum Web Hosting
    Replies: 4
    Last Post: 11-23-2002, 01:32 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