You are here: Foswiki>Tasks Web>Item13595 (09 Sep 2015, GeorgeClark)Edit Attach

Item13595: Foswiki does not create a missing .htpasswd

pencil
Priority: Normal
Current State: No Action Required
Released In: n/a
Target Release: n/a
Applies To: Engine
Component:
Branches:
Reported By: KennethLavrsen
Waiting For:
Last Change By: GeorgeClark
As I am setting up my test server at home (where I do not authenticate towards a corporate LDAP) I try to to a full bootstrap start

And after having fiddled my way through configure and I think I have everything setup I need to register myself as the first user

I cannot. I get a useless message in the browser that my user name cannot be added.

In the foswiki error log I get

2015-08-01T12:56:39+02:00 warning The password file does not exist or cannot be written.Run configure and check the setting of {Htpasswd}{FileName}. New user registration has been disabled until this is corrected.

What? I have to create the file myself? It does not say a word about that in configure. Why isn't it just created if it does not exist? Isn't that how it used to work or have I just always had a file there?

At least the error message given in the browser should give the first time installer a hint and configure needs to guide you better through the steps to do

-- KennethLavrsen - 01 Aug 2015

Even making an empty file with touch does not enable registration. I am currently stuck and cannot register the first user.

-- KennethLavrsen - 01 Aug 2015

Also check the irclog more more info, like:
I had changed many things in configure before I went back to Foswiki itself to register.
Including changing to Apache login instead of Template login!!

-- JozefMojzis - 01 Aug 2015

I tried to remove the .htpasswd file and register a new user. I cannot even see the registration page. It shows that registration is disabled.

So it seems it is configure that creates the .htpasswd file and not the first registration. That makes sense. But that also means that configure failed to create the file. There is a secret combination of going though configure - setting up email, etc and save and not have a .htpasswd file.

I did define the user name I was going to register in configure as the admin user name. Setting up the admin account is still convoluted and hidden. It should be the first thing you are met with when you enter configure for the first time. The note at the top gives a weak hint but not a proper - DO THIS FIRST!. And better. It should be the only thing you can do at first.

-- KennethLavrsen - 01 Aug 2015

I screw up my installation and had to start all over.

And now I cannot reproduce the problem. Main difference is that now I have a missing CPAN lib installed required by the enabled TimeCalcPlugin. Can it be because of this error that configure did not create the .htpasswd file?

-- KennethLavrsen - 01 Aug 2015

I'd be surprised if a missing lib for an extension would be preventing the configure checkers from running. The .htpasswd file is automatically created if it does not exist, when the {Htpasswd}{FileName} checker runs. It runs when the configure UI is initially loaded. I also can't see how to make this fail. Entering bin/configure in the URL causes the file to be created if missing. The only thing I can think of is if something is stopping the configure Rest UI from operating.

Did you configure using the tools/configure UI? I don't believe the checkers run by default, Ah, no they don't. We probably ought to document to run checkers with tools/configure -check to make a pass of all checkers after a shell configuration to make sure functions like creating .htpasswd execute. And with that I find another bug, No output generated by checkers from shell.

I'll leave this open, if you can come up with a path to recreate the issue, we can take it from there.

-- GeorgeClark - 04 Aug 2015
 

ItemTemplate edit

Summary Foswiki does not create a missing .htpasswd
ReportedBy KennethLavrsen
Codebase 2.0.0
SVN Range
AppliesTo Engine
Component
Priority Normal
CurrentState No Action Required
WaitingFor
Checkins
TargetRelease n/a
ReleasedIn n/a
CheckinsOnBranches
trunkCheckins
masterCheckins
ItemBranchCheckins
Release01x01Checkins
Topic revision: r6 - 09 Sep 2015, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy