LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 12-14-2003, 07:26 AM   #1
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 14.0.4 - Server Ubuntu 14.04.5 LTS
Posts: 963

Rep: Reputation: 32
protecting Web Folders


Hi people i'm working on this again, i never got around to trying it before due to house hold problems..

any way i'm trying to password protect a www folder..
I'm using this sample
http://www.desilva.biz/apache/pwdweb2.html

but i still get the index file...

here is what i'm doing.

my .HTACCESS file is

AuthType Basic
AuthName "what are you doing here"
AuthUserFile /var/www/.htpasswd/family/passwd
require valid-user

and my passwd has my ( user_nameassword_code )

[root@www root]# mkdir /var/www/.htpasswd
[root@www root]# cd /var/www
[root@www www]# ls

[root@www www]# ls -la
total 32
drwxr-xr-x 8 root root 4096 Dec 14 08:27 .
drwxr-xr-x 22 root root 4096 Dec 1 01:59 ..
drwxr-xr-x 2 root root 4096 Oct 23 18:54 cgi-bin
drwxr-xr-x 3 root root 4096 Dec 14 07:53 error
drwxrwxr-x 14 root gateway 4096 Dec 14 08:25 html
drwxr-xr-x 2 root root 4096 Dec 14 08:27 .htpasswd
drwxr-xr-x 3 root root 4096 Dec 1 01:59 icons
drwxr-xr-x 14 root root 4096 Dec 1 01:53 manual
[root@www www]# cd html/
[root@www html]# ls
aliens downloads favicon.ico images linux usage
cam ebooks forums index_behind.php mm_menu.js
community family gallery index.php shop
[root@www html]# cd family/
[root@www family]# ls
passwd

[root@www root]# mkdir /var/www/.htpasswd/family
[root@www root]# cp /var/www/html/family/passwd /var/www/.htpasswd/family/passwd
[root@www root]# /etc/rc.d/init.d/httpd restart
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
[root@www root]#

can some one give me a push to the right way, i am alittle lost !

TT
 
Old 12-14-2003, 09:52 AM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
".htaccess" should eb lowercase. You should also make sure that httpd.conf has directory entry showing "AllowOverride Authconfig".
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Password Protected web folders wolftechmn Linux - General 1 12-14-2003 12:58 AM
Password Protecting Web Folders tommytomato Linux - Security 4 12-07-2003 08:18 AM
Password Protecting Web Folders tommytomato Linux - Security 3 12-06-2003 09:51 AM
Password Protecting Web Sites ChrisDiG Linux - Software 1 11-01-2003 08:53 AM
Password Protecting Folders with Apache wyndman Linux - Newbie 0 06-27-2003 01:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 06:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration