Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

.htaccess/.htpassswd breaks .. but not sure why

Status
Not open for further replies.

youradds

Programmer
Jun 27, 2001
817
GB
Hi,

Got a bit of a weird one here :(

Recently, we setup these changes on the server:

open_basedir=off
ffmpeg
enabled the exif functions
install Zend Optimizer

However, now when we try and access a folder which is password protected, we get an error (404, not a 500 IS Error)

Has anyone got any suggestions as to what I can try? I'm all out of ideas :(

TIA!

Andy
 
There's really not a lot of information to go on here, but if you're getting a 404 it sounds like you're not even getting into the directory for it to even be able to see the .htaccess file. The first place I would look in that case is the permissions (owner + group) of the actual directory.

If it worked before and it doesn't work now maybe something changed the directory permissions, or maybe as more of a long-shot if Apache was running as user "apache" and something changed it so it is running as "nobody" or something goofy like that and the directory is still owned by apache or in the apache group - that could affect your permissions to get at the directory.

I remember frontpage extensions used to be a PITA that way and would go in and change the ownership of the whole directory structure to something like web.web and it usually screwed everything up if it wasn't set up right...

Just some ramblings to look at....
 
Hi,

Thanks for the reply. Yeah, I know not much info - unfortunatly don't have much to go on myself :(

Will check out your suggestions now.

BTW, when the .htaccess fle is renamed to .htaccess.old (or something), the page loads fine - which is even more confusing :/)

Cheers

Andy
 
BTw, this error couldn't be causing it?

Failed loading /usr/local/ioncube/ioncube_loader_lin_5.2.so: /usr/local/ioncube/ioncube_loader_lin_5.2.so: cannot open shared object file: No such file or directory
 
Mmmn now this is interesting:

[Mon Apr 05 11:44:04 2010] [error] [client 83.148.158.172] user jack: authentication failure for "/cgi-bin/links/admin/admin.cgi": Password Mismatch

..yet that user/password combo is correct (I even generated it with:

htpasswd -c .htpasswd jack
Enter password: ...

Very weird :/
 
BTw, this is getting more and more screwed up by the minute :|

.htaccess file:

AuthName "My Secured Page"
AuthUserFile /home/mebar/domains/thedomain.com/public_html/cgi-bin/links/admin/.htpasswd
AuthType Basic
require valid-user


.htpassw

jack:SRxKbO6srRZ9E
andytest:21X57r4Yb/4Po

However, if never actually asks for the logins!!!! It just shows this every time:

[Mon Apr 05 11:50:14 2010] [error] [client 83.148.158.172] user jack: authentication failure for "/cgi-bin/links/admin/admin.cgi": Password Mismatch

Now, I know that login details are saved when you re-try a login, but even after testing in different browsers (and closing FF, so test it from a clean load), it still seems to think I'm trying to login as jack - what the hell!!!

Any advice is much appreciated - I'm gonna end up loosing my hair soon otherwise :(

TIA!

Andy
 
One other thing to check is that there are no .htaccess or .htpasswd files in directories above the one you're in that could be having an effect, or that there are not some system-wide defaults someplace that are overriding your local file.

This is more of a question to the world than a statement, but I seem to remember there being a setup parameter someplace that determined whether directory access could be overridden by a .htaccess file in the specific directory or whether it was controlled by some master config file....

Just more ideas tossed around to spur thought....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top