Tags:
create new tag
view all tags
Refactored from DirectoryDirectiveInHttpdConf

Problem 1

Why does Directory Directive Allow from all seem to deny access, while Deny from all seems to allow access?

Might my file permissions for those directories be causing this strangness?

My system details:

  • TWiki version: TWiki20030201
  • Perl version: v5.8.0 built for i586-linux-thread-multi
  • Web server & version: Apache/1.3.26 Server at teflchina.org Port 80
  • Server OS: SuSE Linux 8.1
  • Web browser & version: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020903
  • Client OS: SuSE Linux 8.1

Solution 1

I'm not entirely sure, but I think the odd behavior might be because of the lack of an Order directive. The Order directive specifies which order the Allow and Deny directives are processed in. For example, say you place both Allow from all and Deny from all in a Directory setting. Then, if you have Order deny,allow, the allow takes precedence and everyone has access. If you have Order allow,deny, then the deny takes precedence and nobody does.

Now, your directories inherit permissions from other places, so unless you specify all three (allow, deny, and order), odd things can happen.

-- WalterMundt - 04 Feb 2003

Changes

  • Updated /etc/httpd/httpd.conf snip
    httpd.conf.snip20030204c
  • Removed some problem <Directory ...> directives that I had incorrectly implemented months ago
  • Added Order deny,allow to my remaining <Directory ...> directives
  • Moved my twiki instalation from my site directoy (/var/www/teflchina.org) to the location indicated in the Instalation Intructions (/home/httpd/twiki). I am not sure I needed to do that but I did to try to follow the intstructions as close as I can.
    • I have added the a StriptAlias and an Alias to my <VirtualHost *> directive (because my site is in /var/www/teflchina.org but my Wiki is now in /home/httpd/twiki).
    • I think I want to move the Twiki back into my /var/www/teflchina.org dir
      • twiki/lib/TWiki.cfg will need to be updated to point there in that case (I forget which param in twiki.cfg but I think there is one there that currently points to /home/httpd/twiki as default and will need to be updated to /var/www/teflchina.org/twiki
      • I also want to implement, using Aliases I think, ShorterURLs (see notes towards bottom of that page) and that might effect where I need to put dirs.

Problem 2 - How can I correct the following Testenv errors?

Testenv Errors

$pubDir:/twiki/pub
Note: This is the public directory, as seen from the file system. It must correspond to $pubUrlPath.
Error: Directory does not exist or file wikiHome.gif does not exist in this directory.
$templateDir:/twiki/templates
Note: This is the TWiki template directory, as seen from the file system.
Error: Directory does not exist or file view.tmpl does not exist in this directory.
$dataDir:/twiki/data
Note: This is the data directory where TWiki stores all topics.
Error: Directory does not exist.

Those dirs seem to be there - my browser tells me, "Forbbiden, you do not have permission to access those directories," when I point Mozilla at http://teflchina.org/twiki/bin or http://teflchina.org/twiki/pub or http://teflchina.org/twiki/templates or http://teflchina.org/twiki/data . So why does Testenv report "Directory does not exist" for /twiki/pub /twiki/templates and /twiki/data ?

Solution 2 - In twiki/lib/TWiki.cfg I changed


   $pubDir           = "/twiki/pub";
   $templateDir      = "/twiki/templates";
   $dataDir          = "/twiki/data";

to

   $pubDir           = "/home/httpd/twiki/pub";
   $templateDir      = "/home/httpd/twiki/templates";
   $dataDir          = "/home/httpd/twiki/data";

Note:%br% The default TWiki.cnf should be that way - match the dir examples that are in the Istalation Instructions. Would save lots of confusion.

Testenv - http://teflchina.org/twiki/bin/testenv - now returns almost error free. I did the Perl command line fix to change user nobody to wwwrun (because my server runs as wwwrun, not nobody). Only other red in the Testenv is this note:

$siteLocale:en_US.ISO-8859-1 Note: This TWiki.cfg parameter sets the site-wide locale - for example, de_AT.ISO-8859-1 where 'de' is the language code, 'AT' the country code and 'ISO-8859-1' is the character set. Use the locale -a command on your system to determine available locales. Warning: Unable to set locale to en_US.ISO-8859-1, actual locale is C - please test your locale settings.

Problem 3 - When I try to save a page edit, I get this Error page:

       Topic save error
       During save of file TWiki.TWikiPreferences an error was found by the version control 
       system. Please notify your TWiki administrator.

       /usr/bin/ci -q -l -m'none' -t-none -w'guest' /home/httpd/twiki/data/TWiki/TWikiPreferences.txt  
       2>&1 ci: /home/httpd/twiki/data/TWiki/TWikiPreferences.txt,v: Permission denied

       Go back in your browser and save your changes locally.

My current httpd.conf snip

It seems I am still stuck :-(. Could it be a permissions problem in my twiki/data dir? Here is a listing of twiki/data? YES it IS! Darn I thought I had perms right!

Solution 3

     # cd /home/httpd/twiki/
     # chown -R wwwrun data pub

and presto! I can now save edits :-).

Problem 4 - Trouble in mail feature.

I registered myself on my twiki and got this mail Error:

      Send Mail Error
      The e-mail could not be delivered. Please notify your TWiki administrator, rogerhc@pacbell.net

      ERROR: Can't send mail using Net::SMTP (can't connect to 'mail') 

I have Postfix installed and turned on on my server but I don't know if I have it configured right or not. I replaced "sendmail" with "postfix" in TWiki.cfg and left the arguments that were there alone.

It is like this now:

      $mailProgram      = "/usr/sbin/postfix -t -oi -oeq";

Q: Can I get Twiki to use something else until I can get my Postfix instalation working properly?

Q: Could those arguments (-t -oi -oeq, they are from the sendmail version of that config line) be a problem here?

Solution 4

I am using Postfix as my mail server. Postfix imitates Sendmail commands and actually needs the sendmail command. So in TWiki.conf I now have gone back to the default:

      $mailProgram      = "/usr/sbin/sendmail -t -oi -oeq";

AND in TWikiPreferences I have removed the "mail" value so that the above value in twiki/lib/TWiki.cfg will be used.

Now email seems to be working. I can now register on my Twiki without getting the error above error message.

Problem 5 - Configuing my email server, Postfix, on the server

I am not receiving the Registration email. I think Postfix is not configured properly

-- RogerChrisman - 21 Feb 2003

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2003-02-21 - RogerChrisman
 
  • 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.