horoscopes2000
07-01-2002, 04:24 PM
Hi Guys,
Can anyone tell me how to password protect certain files or folders on my RaQ3 please?
I need some specific examples if at all possible.
Thanks in advance. :o)
horoscopes2000
07-02-2002, 01:06 PM
Thanks for replying. What do I do to .htaccess and how do I prevent that being viewed or changed by other people?
Omair Haroon
07-03-2002, 07:07 AM
Hello,
I thought of you to be a very experienced Cobalt guy :) .. But anyways.. :)
To password protect a directory via .htaccess, here's what you'll need to do.
1) Telnet or SSH into your server
2) cd to the directory you want to protect
3) Type: pico .htaccess
4) Paste this in the file, remembering to change the /paths to the .htpasswd file...but I usually just place it in the user's root directory. You can also specify the message you want to show up on the password box where it says "The Secret Directory":
AuthUserFile /home/sites/site78/web/cgi-bin/tgp/admin2/.htpasswd
AuthGroupFile /dev/null
AuthName "The Secret Directory"
AuthType Basic
<Limit GET POST>
require valid-user
</Limit>
5) Save and exit Pico (ctrl+x, y)
6) cd /home/sites/user (or where ever you specified in .htaccess)
7) Type: htpasswd -c .htpasswd user_name (be sure to change user_name to the correct user name)
8) It will then prompt you for a password. Enter it twice and you're all done!
Hope that helps :)
Salam,
-Omair
Kerbash
07-03-2002, 09:14 AM
Thanks for your detailed instructions Omair!
I have had a password problem for a while now. I have followed your instructions (and have followed other instructions listed on this site before.) but it dosen't seem to be working.
I get the POP UP password boxes for most other things (admin pages, PHPMyAdmin, etc...) but when I try to protect a directory on my own it dosent seem to take.
I also have Gossamer's File Manager installed... it askes for a password with a popup box.. but when I use it to password protect a directory.. nothing happens..
It's probably something simple that I'm missing... but I can't seem to put my finger on it...
Any suggestions or ideas?
Thanks!
Kerbash
D8Mike
07-03-2002, 07:08 PM
You need to create a .htaccess file and .htpasswd file and upload in the folder you want to protect.
The .htaccess file should look something like
order allow,deny
allow from all
require valid-user
Authname DirectoryName
AuthPAM_Enabled off
Authtype Basic
AuthUserFile /home/sites/sitename/web/directory/.htpasswd
Note: replace sitename and directory with the appropriate path to your .htpasswd file. The path to your main web directory is /home/sites/www.domain.com/web (where domain.com is your domain name).
Create the .htaccess and .htpasswd files in a plain text editor like notepad or vi, then upload them to the server with an FTP program. Be sure to upload the files in ASCII (text) mode.
The .htpasswd file will only have the user*password
horoscopes2000
07-03-2002, 11:33 PM
Originally posted by Omair Haroon
Hello,
I thought of you to be a very experienced Cobalt guy :) .. But anyways.. :)
Hi Omair,
I've had a RaQ3 for about 14 months, but never password protected a directory before. I just learned what I needed to as I went along.
Your instructions were absolutely spot on, worked first time.
Thank you very much for taking the trouble to post such good instructions.
Omair Haroon
07-04-2002, 01:37 AM
No Problem horoscopes.. Its just that you should absorb everything that you can find in this forum category since you own a Cobalt RaQ. But always remember onething, make a backup of every system file before you touch it.
I am glad that I could help somebody out :)
As for Kerbash, since I don't own a RaQ 4 but a RaQ3, but I remember a huge thread going on here that there is something in httpd.conf or srm.conf that you need to edit in order for .htaccess files to work.
Also, I also have installed FileManager from GossamerThreads and remember that it does'nt have the password protection function working properly. It does'nt accepts the username/password you have entered when password-protecting a folder, instead it accepts the site-administrator username/password.
Let me know if I can be of any further assistance.
Salam,
-Omair