How to protect a public directory by passwords
en:How to protect a public directory by passwords
he:כיצד להגן על ספריה ציבורית על ידי סיסמאות
ro:Cum de a proteja un director public prin parole
ru:Как защитить общедоступный каталог, пароли
pl:Jak ochronić katalog publiczny przez hasła
ja:公開ディレクトリをパスワードで保護する方法
ar:كيفية حماية دليل عام بكلمات المرور
zh:如何通过密码保护公共目录
de:Wie man ein öffentliches Verzeichnis durch Passwörter schützen
nl:Hoe te te beschermen van een openbare abonneelijst door wachtwoorden
it:Come proteggere una directory pubblica da password
pt:Como proteger um diretório público por senhas
es:Cómo proteger un directorio público por contraseñas
fr:Comment protéger un répertoire public par mots de passe
This article has been created by an automatic translation software. You can view the article source here.
To protect a public directory iKeepinCloud, it is possible to use a couple of .htaccess and .htpasswd file. It is necessary to adapt these files to the iKeepinCloud environment
The public directory
By default, the public folder is accessible without authentication.
The URL of the public folder is created with this logic :
http://public.User_Name.ID_Platform.ikeepincloud.com/Sub_Folder
For example, in the case of the account 123456 configured on the FR platform 01, here is the URL of the root of the public folder :
http://public.123456.fr01.ikeeincloud.com/
If we create a subfolder top_secret' Here are the URL :
http://public.123456.fr01.ikeeincloud.com/top_secret/
Lexicon
- .htaccess : It is apache containing, inter alia, configuration file the path to the file .htpasswd. It is present in the web hosting directory and is interpreted by Apache.
- .htpasswd : It is the file generated by the tool htpasswd. It contains a table with the couple user /password (encrypted ).
Creating the .htaccess file
The generation of the .htaccess file depends on the physical path to the .htpasswd file. .Htaccess and .htpasswd file must be located in the directory to protect.
Here is an example of a .htaccess file to protect the root of the public folder password :
AuthName 'Acces protege'
AuthType Basic
AuthUserFile './htaccess/123456/.htpasswd'
Require valid-user
Here is an example of a .htaccess file to protect by password the subfolder top_secret :
AuthName 'Acces protege'
AuthType Basic
AuthUserFile './htaccess/123456/top_secret/.htpasswd'
Require valid-user
Create the .htpasswd file
With the command below we proceed to password encryption T0p5ecreT for the user UserTest
htpasswd -bn UserTest T0p5ecreT
UserTest:lBiy7cii4YleM
The result of the command UserTest:lBiy7cii4YleM shall be recorded in the file .htpasswd.
If you don't have the htpasswd tool, generators are available online by doing a search "'htpasswd generator"
Enable comment auto-refresher