User Name
Password
AppleNova Forums » Programmer's Nook »

How safe are .htaccess passwords?


Register Members List Calendar Search FAQ Posting Guidelines
How safe are .htaccess passwords?
Thread Tools
Wyatt
Veteran Member
 
Join Date: Mar 2005
Location: Near Indianapolis
 
2007-07-25, 12:56

I'm in the middle of a sort of summer cleanup project on my FTP server, which I use to manage web sites at 3 domains and 5 subdomains. One of my new subdomains is supposed to be a test area for me to try out new applications on my server before pushing them through to one of my main sites.

I'd like to password protect the area. It's not super important, but I'd prefer to keep prying eyes off of my new stuff.

From a management standpoint, I think .htaccess passwords might be the way to go. I've never used them before, but they seem pretty straightforward. What I'm wondering is, how secure are they?

All of my sites are in subfolders on my FTP server. I don't have any sites in the root folder. The only two files in there are my Google site map (which I'll probably be moving or just plain deleting soon) and an .htaccess file that handles some basic settings for all my sites. Can I put my .htpasswd file in the root directory without any major security risks, or should I use another subfolder that's not accessible from the web? (My root folder isn't accessible from the web at the moment, either.)

Twitter: bwyatt | Xbox: @playsbadly | Instagram: @bw317
  quote
ast3r3x
25 chars of wasted space.
 
Join Date: May 2004
Send a message via AIM to ast3r3x  
2007-07-25, 13:01

Secure.

As long as nobody changes the httpd.conf to stop using them I think the biggest problem with them is that I think they are capable of being brute forced since there is no way to limit the number of times a user has tried to login.
  quote
Brad
Selfish Heathen
 
Join Date: May 2004
Location: Zone of Pain
 
2007-07-25, 13:27

Quote:
Originally Posted by fcgriz View Post
Can I put my .htpasswd file in the root directory without any major security risks, or should I use another subfolder that's not accessible from the web? (My root folder isn't accessible from the web at the moment, either.)
You should definitely put the passwords file in a directory that isn't web accessible. For extra obfuscation, you can give it a crazy name that doesn't sound like it's a password file.

The quality of this board depends on the quality of the posts. The only way to guarantee thoughtful, informative discussion is to write thoughtful, informative posts. AppleNova is not a real-time chat forum. You have time to compose messages and edit them before and after posting.
  quote
Majost
monkey with a tiny cymbal
 
Join Date: Nov 2004
Location: Lost
 
2007-07-25, 13:37

Quote:
Originally Posted by ast3r3x View Post
Secure.

As long as nobody changes the httpd.conf to stop using them I think the biggest problem with them is that I think they are capable of being brute forced since there is no way to limit the number of times a user has tried to login.
Aren't they also transmitted in clear (or only slightly obfuscated) text? You need SSL for encryption to apply. That said, for a dev site it should work okay.
  quote
ast3r3x
25 chars of wasted space.
 
Join Date: May 2004
Send a message via AIM to ast3r3x  
2007-07-25, 13:41

Quote:
Originally Posted by Majost View Post
Aren't they also transmitted in clear (or only slightly obfuscated) text? You need SSL for encryption to apply. That said, for a dev site it should work okay.
Yes, but that holds true for any password/username transmitted over the web.

Anyways, anything like this is only as secure as your server is. You can have all the htaccess' you want, but if I can access it from another part of the server you are screwed.
  quote
Wyatt
Veteran Member
 
Join Date: Mar 2005
Location: Near Indianapolis
 
2007-07-25, 14:14

Okay, thanks for the answers everybody. It's basically along the lines of what I expected, so I'll set it up that way, if my Web host ever e-mails me back. I e-mailed them earlier to get the absolute path to my server share, but they haven't gotten back with me.

I'll check back in and let you guys know how it goes once I start actually working on it. Thanks!

Twitter: bwyatt | Xbox: @playsbadly | Instagram: @bw317
  quote
Brad
Selfish Heathen
 
Join Date: May 2004
Location: Zone of Pain
 
2007-07-25, 15:21

Does your host allow any scripted languages like PHP?

For example, if you put this in a PHP file and access it from a web browser, it'll show you its path on the server.
[php]<?php echo dirname(__FILE__); ?>[/php]

The quality of this board depends on the quality of the posts. The only way to guarantee thoughtful, informative discussion is to write thoughtful, informative posts. AppleNova is not a real-time chat forum. You have time to compose messages and edit them before and after posting.
  quote
Wyatt
Veteran Member
 
Join Date: Mar 2005
Location: Near Indianapolis
 
2007-07-25, 15:28

Quote:
Originally Posted by Brad View Post
Does your host allow any scripted languages like PHP?

For example, if you put this in a PHP file and access it from a web browser, it'll show you its path on the server.
[php]<?php echo dirname(__FILE__); ?>[/php]
Actually, after I finish my little house cleaning project (which this is the last component of), my next project is to completely redo my blog with PHP/MySQL. I'm redoing some old code, so it won't take me long, but I'm still pretty excited about it. I do love a good software project.

I can't believe I didn't think to look for a PHP function to figure this out for me. I'll try that out this evening. Thanks again, Brad!

[update]

Thanks again everybody for all of your help. I've got it working right now, and it's perfect. Now I feel pretty confident in my setup.

Twitter: bwyatt | Xbox: @playsbadly | Instagram: @bw317

Last edited by Wyatt : 2007-07-25 at 17:14.
  quote
Posting Rules Navigation
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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

Post Reply

Forum Jump
Thread Tools
Similar Threads
Thread Thread Starter Forum Replies Last Post
iMac only boots into Safe Mode after Security Update ghoti Genius Bar 7 2006-05-12 15:05
Safe sleep for the masses! (OF mod included) Brad Apple Products 37 2005-12-01 15:52
Safe Sleep Feature stevegong Apple Products 11 2005-10-28 09:14
CandyBar: Safe? SonOfSylvanus Third-Party Products 2 2005-01-05 21:03


« Previous Thread | Next Thread »

All times are GMT -5. The time now is 14:01.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004 - 2024, AppleNova