Tags:
create new tag
view all tags

Question

I'm trying to set up a Twiki server at work and ran into a few permissions and authentication issues. I followed the instructions on how to set up the Twiki server, I have it up and running. I want the basic authentication: need password when editing, however even after registration, I can't seem to sign in as my TWiki name. (It's always as Guest). When editing, it'll say Guest instead of my TWiki name.

I have the .htaccess (in bin dir) file set to Basic, my .htpasswd (in data dir) is also up with my login and password encrpted. All files are owned currently owned by nobody.

Is there something I need to add to the /etc/passwd or /etc/group file in order for this to work? I have tried to add an entry with my name to /etc/passwd and changed owners, but got the same results.

Thanks

Environment

TWiki version: TWiki Release 01-Sept-2004
TWiki plugins:  
Server OS: RedHat 9.0
Web server: Apache 2.0.52
Perl version: Perl 5.8.0
Client OS: Windows XP
Web Browser: Mozilla FireFox
Categories:  

-- JennyThai - 29 Nov 2004

Answer

Start by looking at /var/log/httpd/* and /var/log/messages to see if you're getting any error messages from the web server when you attempt to authenticate.

The Red Hat stock setup runs Apache as user apache, so that's probably who should own any writable files. You can set all other files to be owned by root and read-only to everyone else (read/execute-only for Perl scripts), to prevent accidental overwrite.

-- KennethPorter - 30 Nov 2004

-- JennyThai - 30 Nov 2004

Looking at the /var/log/httpd/* and /var/log/message files don't show any attempts at all to authenticate. When I initially logged on to the home page of Twiki, it should say welcome Guest, instead of my TWiki loginname. When hitting the edit button, it'll go staight to the editing page without asking for any type of login.

I tested out the testenv script and it said everything looks fine. Only thing is that in the User field, it still says "nobody". I can't seem to find a way to change that.

I also tried to change ownership to apache for /var/www/twiki/bin dir and tempplate dir and still got the same results. The rest of the directories are owned by nobody.

Any other suggestions? Thanks!

-- JennyThai - 30 Nov 2004

Btw, I forgot to mention that when I set up my Apache server, I installed & configured everything by default. Is there anything else I should have done during the Apache installation?

-- JennyThai - 01 Dec 2004

Did you install Apache using the Red Hat httpd RPM? That has a good set of defaults.

I put all the custom configuration inside a VirtualHost block in /etc/httpd/conf.d/wiki.conf. That way it remains easy to manage if the main httpd.conf file changes in a new RPM release.

In my bin directory all scripts are mode 775, owned by apache.apache. The setlib.cfg is mode 664.

In /etc/httpd/conf/httpd.conf you should have these lines to specify what user the server runs as:

User apache
Group apache

-- KennethPorter - 01 Dec 2004

I got the tar file straight from the Apache website and configured and compiled it on my redhat box.

I then followed step by step instructions on setting up the twiki server (even double-checked it to make sure everything was covered).

/etc/httpd/conf/httpd.conf file already have those two lines you mentioned above. I also changed permissions and ownership in the bin dir also mentioned above as well, and still got the same results. I'm baffled!

I have noticed on my own twiki page, that the sign-in link is highlighted yellow with a question mark next to it. i assume that means the link doesn't exist?

Btw, i don't have a wiki.conf in /etc/httpd/conf.d dir. Do I need one and if so, what content should I put in there??

-- JennyThai - 01 Dec 2004

I don't have a clue how Apache configures when built and installed directly from the original tarball. The Red Hat RPM is based on the tarball from Apache but then adds numerous patches and helper files to make it fit within the Red Hat environment. This also insures that all files are registered in the RPM database, which offers various advantages.

When using the stock Red Hat Apache setup, it uses a httpd.conf that includes /etc/httpd/conf.d/*.conf. The wiki.conf file I mention is one I created that holds all the TWiki-specific settings.

I put all files from TWiki except the pub directory in /var/www/TWiki, and put the pub directory under the document root, in /var/www/html/wiki/. My wiki.conf contains this:

<VirtualHost *:80>
        ServerAdmin webmaster@matureasskickers.net
        ServerName wiki.matureasskickers.net
        DocumentRoot /var/www/html/wiki
        ScriptAlias /bin/ "/var/www/TWiki/bin/"
        # Redirect any access to 'index.html' to the 'view' script (i.e. Main.WebHome)
        Redirect /index.html http://wiki.matureasskickers.net/bin/view
        <Directory "/var/www/TWiki/bin">
                Options +ExecCGI
                SetHandler cgi-script
                AllowOverride All
                Allow from all
        </Directory>
        <Directory "/var/www/html/wiki">
                # Turn off directory indexing in this and sub directories
                Options FollowSymLinks +Includes -Indexes
                AllowOverride None
                Allow from all
        </Directory>
        <Directory "/var/www/TWiki/data">
                deny from all
        </Directory>
        <Directory "/var/www/TWiki/templates">
                deny from all
        </Directory>
        CustomLog /var/log/httpd/matureasskickers.net/ma/access_log combined
        ErrorLog /var/log/httpd/matureasskickers.net/ma/error_log
        TransferLog /var/log/httpd/matureasskickers.net/ma/transfer_log
</VirtualHost>

-- KennethPorter - 02 Dec 2004

I have something similiar to your wiki.conf file in my /usr/local/apache2/conf/http.conf file. Does that work the same?

-- JennyThai - 06 Dec 2004

Jenny: I had exactly the same problem, and it turned out to be that I had a mistake in httpd.conf with the wrong path to my twiki/bin directory. Apache produced no errors, and everything else seemed to work, except I didn't receive a prompt to enter my name and password when I clicked Edit. This took me three hours to find and less than a minute to fix. Bah.

-- TWikiGuest - 16 Jul 2005

Edit | Attach | Watch | Print version | History: r9 < r8 < r7 < r6 < r5 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r9 - 2005-07-16 - TWikiGuest
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.