View Full Version : passworded directory
kordric
March 19th, 2006, 09:52 AM
hello i was wondering if there was a way to to make a passworded directory on a windows xp machine. I setup a server on it so i can access my files anywhere within this certain folder. So i want to add a passworded directoy on it
Tortanick
March 19th, 2006, 10:09 AM
you'll want an FTP server then, any good one will be able to have passwords
kordric
March 19th, 2006, 10:10 AM
no i have one setup using windows xp. Its an http server atm
oracle128
March 19th, 2006, 10:31 AM
Password protecting web pages (http://www.hwg.org/lists/hwg-servers/passwords.html)
degsy
March 19th, 2006, 01:42 PM
If you want to password protect a folder using Windows then you would have to apply permissions to the folder and use your user account details to login.
kordric
March 19th, 2006, 08:47 PM
Thanks, but i figured it out i added a .htaccess with an attached .htpasswd. In order for those of you having this problem also. make a folder in the root directory called .htpasswd within this folder make a folder to corespond with the folder you want passworded. within that folder add a file called htpasswd. so its just a file, dont give it an extension.
next go to the folder that you want passworded and make a file called .htaccess
inside that add something like
AuthUserFile C:\folder\.htpasswd\downloads\htpasswd
AuthType Basic
AuthName "Restricted Area"
require valid-user
Direct the "AuthUserFile" to the htpasswd file.
next you need an md5 generator witch it easy to find on google. generate a password and add put it inside the htpasswd file. Use notepad to add it
should look something like this
username:$apr1$ln4.....$KDpgARmGkmK2l4ibiHv/::
degsy
March 19th, 2006, 09:21 PM
hmm... maybe you should have mentioned that you were using Apache
Are you using Apache on Windows?
Are you are using .htaccess & .htpasswd?
Are you sure you need an MD5 generator?
It seems to me that you would need a little more configuraton to setup .htaccess on Windows.
http://sniptools.com/tutorials/windows-apache-and-htaccess-authentication
kordric
March 20th, 2006, 07:57 AM
yes i guess i forgot to mention. but htacces is quite easy to setup
degsy
March 20th, 2006, 02:52 PM
I think you need to give more information on your solution as Windows and .htaccess are not immediately compatible.
oracle128
March 20th, 2006, 05:01 PM
For anyone who's reading, degsy is referring to Windows usually being unable to create filenames beginning with a period (as required for ".htaccess" and ".htpasswd" files).
Create .htaccess in Windows (http://fairlyrealistic.com/archives/2006/03/create_htaccess_in_windows.php)
You can also use the Windows command line to rename a file to one beginning with a period, for example if you put your htaccess stuff in a file called "htaccess.txt":
cd "C:\Program Files\Apache Group\Apache2\htdocs"
ren htaccess.txt .htaccess