Question
After installing, I can't get the configure script to clear these errors:
Error: Could not create test file /twiki/logs/configurationlog.txt
Error: Could not create test file /twiki/logs/debug.txt
Error: Could not create test file /twiki/logs/warnDATE.txt
Error: Could not create test file /twiki/logs/logDATE.txt
I don't understand why it can't create these or the path where it believes it should be looking. My twiki dir is /var/www/html/twiki. Under this, my view script is stored under bin/view. I created a logs dir with wide open permission and expect the logs to write there.
What are these paths relative to?
Environment
--
TWikiGuest - 24 Aug 2006
Answer
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
In
TWiki.cfg there is an internal variable called
{LogDir} that is used as a seed for the log file paths. The actualy paths are defined as (for example)
$TWiki::cfg{LogDir}/logs/configurationlog.txt. it looks as if you have somehow reset {LogDir} to '' (by default it should be the same as {DataDir}).
Manually edit
LocalSite.cfg, and if there is a setting for {LogDir} in there, delete it.
--
CrawfordCurrie - 24 Aug 2006
My LogDir was the same as the DataDir, there was no setting in LocalSite.cfg, and DataDir is writable.
Any more suggestions?
I cannot believe this thing cannot tell you the absolute path of the log file it resolved to, or report some kind of error as to
why it can't write to the log file. Am I missing something?
--
TWikiGuest - 24 Aug 2006
- my setings for {LogDir} is not relative, it is set to /var/www/twiki/data/log2026-01-22.txt
- it helped me many times to use the attached permissions rest script to solve problems with permissions. See also SettingFileAccessRightsLinuxUnix. Look at it and check that you chown your manualy created directory and apply the same permissions to it as this script would assign to data directory
--
MartinMinka - 25 Aug 2006
Possibly related to the space in the filename? Try to define a log date that has no spaces. The default
{LogFileName} is
/path/to/twiki/data/log%DATE%.txt, which expands to
/path/to/twiki/data/log202601.txt
In case you changed
lib/TWiki.cfg restore it to the original version from the TWiki package. The
$logDir is used internally and is initialized as:
my $logDir = $cfg{LogDir} || $dataDir;
--
PeterThoeny - 29 Aug 2006