Restriction by means of password

It is important to realize that the servants are formed so that by means of the World Wide Web, any person from any point of the world to any hour can accede to any file put in her space Web. Nevertheless, there are two methods to restrict the access. These are only available for clients with virtual dominions.

The access to a directory can be restricted. For example to enter the http://neathosting.net/prohibido/ directory, it is necessary to write the name of user (username) classic and the password (password) Web

How to do it?

He is a little complicated - it is not for nascent:

  1. .htaccess writes a called file like this:


    AuthUserFile /web/guide/dnet/manzanas/.htpasswd
    AuthGroupFile /dev/null
    AuthName “Restricted Access�
    AuthType BASIC
    <Limit GET POST>
    require to user classic
    </Limit>

    It puts the name complete of the directory where it is going to put the file of passwords instead of /web/guide/dnet/manzanas. It puts what wants after AuthName and the name of user required instead of classic.

  2. .htaccess to the directory transfers the file who wants to restrict. It must transfer it in way ASCII (text). If it is using TWO or Windows, can have difficulties to create a file with the name .htaccess. It creates it with the .htaccess.txt name and after transferring it, it changes the name .htaccess. In addition, this file must be writing in format text, not in format text MSDOS. Once transferred, it will seem that the file has disappeared. This is because the files that begin with a point are hidden by the system. It can see it from SSH with commando ls -.

  3. It connects to his dominion by SSH and creates the directory where it wants to locate the file of passwords, and soon changes to this directory. For example:

    to mkdir apples
    CD apples

  4. The commando writes to create the file of passwords:

    htpasswd - c .htpasswd classic

    Classic by the name of required user replaces

  5. The servant will ask to him:

    Adding password for classic
    New password: the password writes here. It will not appear in the screen
    Re-type new password: the password writes again

This is the most basic configuration. NCSA has more details. These files, are not seen with FTP. Nevertheless, they are possible to be seen with SSH writing ls -.

This method only restricts access by the Web. Meaning that other users of the servant will continue having access this directory. In order to protect his more confidential archives, it is necessary to use method 2.

Multiple users

If he wants to give access to more of a user, follows the steps above indicated, but with these changes:

  1. .htpass puts more users in the file using the commando htpass without option - c
    p.ej.

    htpasswd .htpasswd Juan
    htpasswd .htpasswd alberto
    htpasswd .htpasswd elena

  2. .htgroup with a list of the users creates a file of called group (póngalo in the same directory who .htpasswd)


    friendly: classic Juan alberto elena

  3. .htaccess modifies the file thus:


    AuthUserFile /web/guide/dnet/manzanas/.htpasswd
    AuthGroupFile /web/guide/dnet/manzanas/.htgroup
    AuthName “Restricted Access�
    AuthType BASIC
    <Limit GET POST>
    require group friendly
    </Limit>

Now only “the friendly� members of the group can accede to the directory

With this method the reading can be prohibited files. For example it tries to read prohibido.html. Also it is possible to be used to prohibit to read a directory, but for total security, it must prohibit to read the directory and the files inside.

  1. It connects by SSH to his dominion

  2. fichero.htm writes chmod 600 or what is.

More information on permissions

   
[Tariffs] [Requested] [Contactar] [Electronic Diseño] [Comercio] [Connections] [Dominions] [Economic Space]
[Services Including] [Distribution] [Our Servants] [pre-installed Programs] [Manuals]

[Dedicated Servants] [High in Common Finders] [Preguntas] [SFTP] [Manuals] [Conditions] [email] [Map of site]

Connections of Interest: [Hotels and trips] [Hotels] [Guía de Campings] [Guide of the World] [Busca Use] [Guía de Viajes] [Tattoos]

Home | Sitemap | Contact us | Copyright © 2010 www.neathosting.net All rights reserved.

, , , ,