Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > password protecting a folder

Reply
Thread Tools

password protecting a folder

 
 
don
Guest
Posts: n/a
 
      01-14-2010
I have a folder in my public html folder which I would like to password
protect so that only certain people would be able to open this link.

How would I do this.......... my website is on a Unix hosting
account........... www.mywebsite.com/privateFolder

Thanks.........



 
Reply With Quote
 
 
 
 
richard
Guest
Posts: n/a
 
      01-14-2010
On Wed, 13 Jan 2010 22:45:36 -0500, don wrote:

> I have a folder in my public html folder which I would like to password
> protect so that only certain people would be able to open this link.
>
> How would I do this.......... my website is on a Unix hosting
> account........... www.mywebsite.com/privateFolder
>
> Thanks.........


ask your host if you can do that or not.
you would need a script for that either in javascript or php.
if you have php then you could set up a sql database and use that.
 
Reply With Quote
 
 
 
 
Beauregard T. Shagnasty
Guest
Posts: n/a
 
      01-14-2010
richard wrote:

> don wrote:
>> I have a folder in my public html folder which I would like to
>> password protect so that only certain people would be able to open
>> this link.
>>
>> How would I do this.......... my website is on a Unix hosting
>> account........... www.mywebsite.com/privateFolder

>
> ask your host if you can do that or not.


Duh.

> you would need a script for that either in javascript or php.
> if you have php then you could set up a sql database and use that.


Oh my. That is soooo wrong! One does *not* password-protect a
directory at a web server with JavaScript or PHP. Impossible.

There are several ways that *will* work, but don did not mention what
kind of hosting software is being used (Unix is the OS, not the host).
Apache ... IIS ... If it is Apache,
Google for: apache password protect directory
Thousands of hits.

--
-bts
-Four wheels carry the body; two wheels move the soul
 
Reply With Quote
 
dorayme
Guest
Posts: n/a
 
      01-14-2010
In article <>,
richard <> wrote:

> On Wed, 13 Jan 2010 22:45:36 -0500, don wrote:
>
> > I have a folder in my public html folder which I would like to password
> > protect so that only certain people would be able to open this link.
> >
> > How would I do this.......... my website is on a Unix hosting
> > account........... www.mywebsite.com/privateFolder
> >
> > Thanks.........

>
> ask your host if you can do that or not.
> you would need a script for that either in javascript or php.
> if you have php then you could set up a sql database and use that.


No, it can be done simply on many hosting set-ups if you have access to
..htaccess

This may help OP:

<http://www.freewebmasterhelp.com/tutorials/htaccess/1>

--
dorayme
 
Reply With Quote
 
don
Guest
Posts: n/a
 
      01-14-2010

"Beauregard T. Shagnasty" <> wrote in message
news:him84n$nao$...
> richard wrote:
>
>
> There are several ways that *will* work, but don did not mention what
> kind of hosting software is being used (Unix is the OS, not the host).
> Apache ... IIS ... If it is Apache,
> Google for: apache password protect directory
> Thousands of hits.
>
>


Ok thanks - I googled and now I know what I need to do.......... it was
Apache, I thought it was a Unix permission thing I had to do.




 
Reply With Quote
 
richard
Guest
Posts: n/a
 
      01-14-2010
On Thu, 14 Jan 2010 16:16:26 +1100, dorayme wrote:

> In article <>,
> richard <> wrote:
>
>> On Wed, 13 Jan 2010 22:45:36 -0500, don wrote:
>>
>>> I have a folder in my public html folder which I would like to password
>>> protect so that only certain people would be able to open this link.
>>>
>>> How would I do this.......... my website is on a Unix hosting
>>> account........... www.mywebsite.com/privateFolder
>>>
>>> Thanks.........

>>
>> ask your host if you can do that or not.
>> you would need a script for that either in javascript or php.
>> if you have php then you could set up a sql database and use that.

>
> No, it can be done simply on many hosting set-ups if you have access to
> .htaccess
>
> This may help OP:
>
> <http://www.freewebmasterhelp.com/tutorials/htaccess/1>


Very true.
However, that method has some security issues.
Anyone with the knowledge could hack it.
Using php and an sql database is,IMO, much more secure.
Or at least use a CGI script.
 
Reply With Quote
 
richard
Guest
Posts: n/a
 
      01-14-2010
On Wed, 13 Jan 2010 23:55:51 -0500, Beauregard T. Shagnasty wrote:

> richard wrote:
>
>> don wrote:
>>> I have a folder in my public html folder which I would like to
>>> password protect so that only certain people would be able to open
>>> this link.
>>>
>>> How would I do this.......... my website is on a Unix hosting
>>> account........... www.mywebsite.com/privateFolder

>>
>> ask your host if you can do that or not.

>
> Duh.
>
>> you would need a script for that either in javascript or php.
>> if you have php then you could set up a sql database and use that.

>
> Oh my. That is soooo wrong! One does *not* password-protect a
> directory at a web server with JavaScript or PHP. Impossible.
>
> There are several ways that *will* work, but don did not mention what
> kind of hosting software is being used (Unix is the OS, not the host).
> Apache ... IIS ... If it is Apache,
> Google for: apache password protect directory
> Thousands of hits.


http://www.zubrag.com/scripts/password-protect.php

Just one of a few hundred thousand.
 
Reply With Quote
 
rf
Guest
Posts: n/a
 
      01-14-2010

"richard" <> wrote in message
news:wfg6w7w67te6$....
> On Wed, 13 Jan 2010 23:55:51 -0500, Beauregard T. Shagnasty wrote:
>
>> richard wrote:
>>
>>> don wrote:
>>>> I have a folder in my public html folder which I would like to
>>>> password protect so that only certain people would be able to open
>>>> this link.
>>>>
>>>> How would I do this.......... my website is on a Unix hosting
>>>> account........... www.mywebsite.com/privateFolder
>>>
>>> ask your host if you can do that or not.

>>
>> Duh.
>>
>>> you would need a script for that either in javascript or php.
>>> if you have php then you could set up a sql database and use that.

>>
>> Oh my. That is soooo wrong! One does *not* password-protect a
>> directory at a web server with JavaScript or PHP. Impossible.
>>
>> There are several ways that *will* work, but don did not mention what
>> kind of hosting software is being used (Unix is the OS, not the host).
>> Apache ... IIS ... If it is Apache,
>> Google for: apache password protect directory
>> Thousands of hits.

>
> http://www.zubrag.com/scripts/password-protect.php
>
> Just one of a few hundred thousand.


Just one of a few hundred thousand that do *not* password protect a folder.

Sure, it password protects access to the PHP scripts that are in that
folder, but that is all.

Please explain to all of us, RtS, how this can stop me from accessing, say,
an image from the folder that is "protected". *That* is what .htaccess
password protection is all about.


BTW you still have not explained why "have PHP" is required to be able to
set up "a sql database".


 
Reply With Quote
 
rf
Guest
Posts: n/a
 
      01-14-2010

"richard" <> wrote in message
news...
> On Thu, 14 Jan 2010 16:16:26 +1100, dorayme wrote:
>
>> In article <>,
>> richard <> wrote:
>>
>>> On Wed, 13 Jan 2010 22:45:36 -0500, don wrote:
>>>
>>>> I have a folder in my public html folder which I would like to password
>>>> protect so that only certain people would be able to open this link.
>>>>
>>>> How would I do this.......... my website is on a Unix hosting
>>>> account........... www.mywebsite.com/privateFolder
>>>>
>>>> Thanks.........
>>>
>>> ask your host if you can do that or not.
>>> you would need a script for that either in javascript or php.
>>> if you have php then you could set up a sql database and use that.

>>
>> No, it can be done simply on many hosting set-ups if you have access to
>> .htaccess
>>
>> This may help OP:
>>
>> <http://www.freewebmasterhelp.com/tutorials/htaccess/1>

>
> Very true.
> However, that method has some security issues.
> Anyone with the knowledge could hack it.


Bullshit.

I have built a simple test for you RtS. Here is a folder protected via
..htaccess:

http://barefile.com.au/protected/

There is a file in there called index.html.

After you have used your "anyone with the knowledge" to hack it please list
here, for all of us to see, the contents of that file.

Hint: Nothing at all you can possibly do client side will convice Apache to
serve up that file unless you know the userid and password.

I'm waiting...

> Using php and an sql database is,IMO, much more secure.
> Or at least use a CGI script.


Your opinion is rather less than worthless RtS.

And how does PHP and an SQL database protect the image I have also put in my
folder? There is one there. Please also tell us all what is in that image.


 
Reply With Quote
 
Beauregard T. Shagnasty
Guest
Posts: n/a
 
      01-14-2010
richard wrote:

> Beauregard T. Shagnasty wrote:
>> richard wrote:
>>> you would need a script for that either in javascript or php. if you
>>> have php then you could set up a sql database and use that.

>>
>> Oh my. That is soooo wrong! One does *not* password-protect a
>> directory at a web server with JavaScript or PHP. Impossible.

>
> http://www.zubrag.com/scripts/password-protect.php
>
> Just one of a few hundred thousand.


...which won't work to protect content, only URLs/pages.

But then it is expected that you wouldn't know that.

--
-bts
-Four wheels carry the body; two wheels move the soul
 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Password Protecting a Folder on UNIX-based Website netsurfer Javascript 3 03-21-2005 01:38 PM
password protecting on page on a site RainLover HTML 1 08-04-2004 02:37 PM
Password Protecting a Page Michael HTML 2 04-18-2004 08:44 PM
Need advice on protecting a shared folder Steve Smith Computer Security 3 02-02-2004 11:42 PM
Password protecting areas Jon Agiato ASP .Net 2 08-23-2003 08:37 PM



Advertisments