cancel
Showing results for 
Search instead for 
Did you mean: 

Password Protection now doesn't work

kilburncat
Grafter
Posts: 90
Registered: ‎06-02-2008

Password Protection now doesn't work

Years ago I followed Andrew B's instructions for setting up password protection for my site and it has worked very well, with my changing the password now and again.
Now password protection works only intermittently. Sometimes I'm asked for a password, cancel, hit the back button and then try again, only to be let in without providing the information. Sometimes I can get straight in. One of the pages that I dragged into what I thought was the correct file in Filezilla has disappeared (Not Found 404). I've tried reloading the page in Web Plus X4 but it is still nowhere to be seen. I'm assuming that dragging a file into the file named Memfile (the one that contains the htaccess and  htdocs files) would automatically cause a password prompt to appear. I also think that simply dragging the file completes the transaction and that no further action is required to complete this action.
7 REPLIES 7
spraxyt
Superuser
Superuser
Posts: 10,063
Thanks: 1,369
Fixes: 75
Registered: ‎06-04-2007

Re: Password Protection now doesn't work

Sorry lots of questions…
Is Memfile a file or a folder/directory? Did you mean .htpasswd file rather than .htdocs? The latter ( as /htdocs/ ) is the webroot folder on Homepages.
Were .htaccess and .htpasswd uploaded in ASCII (text) or binary mode?
Are you perhaps having problems with the case of letters? Windows doesn't normally bother whether letters are lower case or upper case but Linux on the web server does. My preference is to use lower case throughout.
Have you set FileZilla to show hidden files (those where the first character of their name is a fullstop)? This is "Force showing hidden files" on its server menu.
David
kilburncat
Grafter
Posts: 90
Registered: ‎06-02-2008

Re: Password Protection now doesn't work

Please don't apologise... Smiley
Filezilla is set to show hidden files.
I said htdocs but I meant htpasswd and htaccess as you suggest.
I went to htpasswd manager on your usertools site but I did not CHMODing the files (not sure if that answers the question about binary etc).
Memfile is a (yellow) folder where I placed all the password protected pages are supposed to be, in Filezilla I drag from the lower right "box" (Filename/Filesize etc) to the Memfile in the box above "Remote Site". I believe this completes the action, there is no queueing any more(?).
Copying the 2 file names exactly as they appear in what I believe is the Memfile folder:
.htaccess
.htpasswd
Ask as many questions as you like, I hope I can answer them.
spraxyt
Superuser
Superuser
Posts: 10,063
Thanks: 1,369
Fixes: 75
Registered: ‎06-04-2007

Re: Password Protection now doesn't work

I think what you've done is correct, and just putting .htaccess and .htpasswd in the folder to be protected is sufficient.
I've just tried this on my own site. I haven't been able to gain access without giving a username and password the first time. It wouldn't let me backspace, and closing the password window gave an 'authorization failed' error. However after logging in properly, on subsequent visits in the same browser session (same tab, or a new one) I wasn't asked again. Closing the browser and opening it again, even with a protected page saved in a tab, resulted in being asked to login.
So it appears to work OK for me. This is using Firefox 5.0 on Windows Vista Home Premium. Firefox kept asking to save the password but I told it not to. Which browser do you use?
David
kilburncat
Grafter
Posts: 90
Registered: ‎06-02-2008

Re: Password Protection now doesn't work

I've checked it in Firefox 5 and IE and it works fine in both. I have no idea why as I have not altered anything.
The one remaining problem is that I cannot find Page 43. It is shown as being inside memfile  on Filezilla, and it is in memfile shown on the 'Maintain Site' facility on Web X4. However when I get 404 Error, the path in the address bar shows as "/los/page43.html"  where it should be "/los/memfile/page43html".
spraxyt
Superuser
Superuser
Posts: 10,063
Thanks: 1,369
Fixes: 75
Registered: ‎06-04-2007

Re: Password Protection now doesn't work

Glad to hear password protection does work for you. Chalk the odd behaviour up to 'one of those things'. Grin
Have you got any .htaccess files in the physical path to that 'missing' file - this includes the / directory above /htdocs/? The symptoms you report could be a .htaccess redirect, or a link, or ../ in the path.
If you put page43.html in /htdocs/ can you browse to it there?
David
kilburncat
Grafter
Posts: 90
Registered: ‎06-02-2008

Re: Password Protection now doesn't work

In Webplus I dragged Page 43 from memfile where it did not have a green tick to the non-password protected file. It then automatically gained a green tick. It can now be accessed when browsing.  Once again it is disconcerting because I have solved the problem although it is not clear to me how or why Crazy
spraxyt
Superuser
Superuser
Posts: 10,063
Thanks: 1,369
Fixes: 75
Registered: ‎06-04-2007

Re: Password Protection now doesn't work

I'm not familiar with Webplus, and don't know what that 'green tick' signifies. However from a quick look through its user guide it looks like it can cope with protected pages, requiring page-security entries to be set up for access.
This is speculation on my part, but is the problem that Webplus has pages in Memfile designated as private, but lacks the necessary access control entries to interface to Apache security. Is Webplus adding its own entries to .htaccess? Have you tried downloading .htaccess using FileZilla and checking its contents?
Hope that makes sense to you, or at least gives you some idea of what to look for?
One check might be to remove the .htaccess and .htpasswd files from that directory, then see if you are allowed access to the page43 file. Rather than moving the files renaming them using FileZilla to a.htaccess and a.htpasswd should suffice.
David