Jump to content


Photo

How to password a Unix folder?


  • Please log in to reply
4 replies to this topic

#1 TropicalBeach

TropicalBeach
  • Members
  • Pip
  • Newbie
  • 1 posts

Posted 29 March 2006 - 01:19 PM

Hi,
Newbie here...

I wish to password a web folder to allow only a few chosen users to see the contents.
Eg. www.foo.com/2006

What Php code is needed?


#2 lead2gold

lead2gold
  • Members
  • PipPipPip
  • Advanced Member
  • 164 posts
  • LocationOttawa, On

Posted 29 March 2006 - 01:27 PM

[!--quoteo(post=359649:date=Mar 29 2006, 08:19 AM:name=TropicalBeach)--][div class=\'quotetop\']QUOTE(TropicalBeach @ Mar 29 2006, 08:19 AM) View Post[/div][div class=\'quotemain\'][!--quotec--]
Hi,
Newbie here...

I wish to password a web folder to allow only a few chosen users to see the contents.
Eg. www.foo.com/2006

What Php code is needed?
[/quote]

you can do that with an sql database and have a login page. or you can use somethign as simple as a .htaccess file if you want.

.htaccess files just have to reside in the directory you want to protect (it will protect all subdirectories as well) and force the user to enter a user/pass before entering that dir.


#3 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 29 March 2006 - 01:54 PM

Are you talking about through linux or through php. In Linux you would need to use chmod to enable read/write permissions.

Your question however isn't particularely clear.

#4 Neomie

Neomie
  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 27 October 2006 - 05:26 PM

I have a similar problem - I've just installed phpmyadmin on my webserver and now discover anyone can access my entire database.

Please help!!!!

I want phpmyadmin, but I want to add some security.

Thanks. 

Neo

#5 effigy

effigy
  • Staff Alumni
  • Advanced Member
  • 3,600 posts
  • LocationIL

Posted 27 October 2006 - 06:39 PM

Apache: Authentication, Authorization and Access Control

HTTP authentication with PHP
Regexp | Unicode Article | Letter Database
/\A(e)?((1)?ff(?:(?:ig)?y)?|f(?:ig)?)\z/




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users