Knowledge base

Welcome to Infomaniak Network's support centre, you will find the answers to the most frequently asked questions below.

Hosting »  Security
You may lock access to a folder so that a username and password are required whenever a request is made for the folder's content (including any files inside).

Actions to be carried out

Log into your control panel
Go to Tools -> Directory Protection
Create a user and corresponding password
In the tree on the left, display the folder to be protected and click on it
Click on the user that will be entitled to access the folder
All users that you require to have access must be selected (i.e. appear inverted). Use the CTRL key to select multiple users.
To recap: the folder must be selected in the tree on the left and the users selected on the right.
Click OK and your directory is protected and you can now repeat the process for other directories, with other users or even groups of users.
From now on, whenever you go to the protected directory, a small padlock will appear in the tree, along with an additional button marked "UNPROTECT" which will allow you to remove the protection and reset the directory to its default state.


Log into FTP Manager
In the tree, display the folder to be protected
Click on the Padlock icon on the same line as the folder
Create a user and corresponding password
Click OK and the folder is locked.

Illustrated steps

Setup via the control panel (example with 2 users)

Setup via FTP Manager

More information

This tool does NOT allow protected access to just one specific page located within a given directory while allowing other pages within the same directory to be accessed freely. For advanced functionality, please read the Apache documentation or e.g.

Such a protection can be set up manually by creating a pair of ".htaccess" and ".htpasswd" files whose syntax is given below, but using the assistant is nonetheless much more straightforward.

Throughout the following example, htaccess protection allows only the user 'damien' to log in, and we assume that the .htpasswd and .htgroup files are placed inside the same directory as the .htaccess file:

Example content of .htaccess file
AuthType Basic
AuthName Restricted
Require user damien
AuthUserFile .htpasswd
AuthGroupFile .htgroup
Example content of .htpasswd file
User passwords must be stored encrypted in the .htpasswd file.

In the case of protection that has been set up via the assistant as illustrated previously, for security reasons, the .htpasswd file is placed in the root of your FTP directory, so that it is placed outside the /web directory (and not in the same directory as .htaccess).

Permitted characters for directory protection (those accepted by .htaccess) are

Link to this answer :

Online support

Email support