Question
I am getting the following error with
RCS and Twiki
=/usr/local/bin/rcs -i -t-none -ko % |F% of .../Main/EcmProjectManager.txt,v failed to create history file =
I have just installed twiki and have been trying to setup groups. On the logs I get the follwing error
| 15 Jan 2007 - 17:53 | Insecure directory in $ENV{PATH} while running with -T switch at /usr/local/apache2/htdocs/twiki/lib/TWiki/Sandbox.pm line 359.
TWiki::Sandbox::sysCommand('TWiki::Sandbox=HASH(0x82250c0)', '/usr/local/bin/rcs -i -t-none -ko %FILENAME|F%', 'FILENAME', '/usr/local/apache2/htdocs/twiki/data/Main/TomPeters.txt') called at /usr/local/apache2/htdocs/twiki/lib/TWiki/Store/RcsWrap.pm line 105
TWiki::Store::RcsWrap::initText('TWiki::Store::RcsWrap=HASH(0x844eb04)') called at /usr/local/apache2/htdocs/twiki/lib/TWiki/Store/RcsFile.pm line 100
TWiki::Store::RcsFile::init('TWiki::Store::RcsWrap=HASH(0x844eb04)') called at /usr/local/apache2/htdocs/twiki/lib/TWiki/Store/RcsWrap.pm line 125
TWiki::Store::RcsWrap::addRevisionFromText('TWiki::Store::RcsWrap=HASH(0x844eb04)', '%META:TOPICINFO{author="TWikiRegistrationAgent" date="1168912...', 'undef', 'TWikiRegistrationAgent') called at /usr/local/apache2/htdocs/twiki/lib/TWiki/Store.pm line 1063
TWiki::Store::__ANON__() called at /usr/local/apache2/htdocs/twiki/lib/CPAN/lib///Error.pm line 379
eval {...} called at /usr/local/apache2/htdocs/twiki/lib/CPAN/lib///Error.pm line 371
Error::subs::try('CODE(0x844dde4)', 'HASH(0x844f02c)') called at /usr/local/apache2/htdocs/twiki/lib/TWiki/Store.pm line 1077
TWiki::Store::_noHandlersSave('TWiki::Store=HASH(0x80dee10)', 'TWiki::User=HASH(0x8998644)', 'Main', 'TomPeters', '\x{a}\x{a}---++ My Links\x{a}\x{a} *
ATasteOfTWiki - view a shor...', 'TWiki::Meta=HASH(0x844e39c)', 'HASH(0x844e6d8)') called at /usr/local/apache2/htdocs/twiki/lib/TWiki/Store.pm line 855
TWiki::Store::__ANON__() called at /usr/local/apache2/htdocs/twiki/lib/CPAN/lib///Error.pm line 379
eval {...} called at /usr/local/apache2/htdocs/twiki/lib/CPAN/lib///Error.pm line 371
Error::subs::try('CODE(0x844ed80)', 'HASH(0x844eca8)') called at /usr/local/apache2/htdocs/twiki/lib/TWiki/Store.pm line 858
TWiki::Store::saveTopic('TWiki::Store=HASH(0x80dee10)', 'TWiki::User=HASH(0x8998644)', 'Main', 'TomPeters', '\x{a}\x{a}---++ My Links\x{a}\x{a} *
ATasteOfTWiki - view a shor...', 'TWiki::Meta=HASH(0x8adc730)') called at /usr/local/apache2/htdocs/twiki/lib/TWiki/UI/Register.pm line 886
TWiki::UI::Register::_writeRegistrationDetailsToTopic('TWiki=HASH(0x806dd04)', 'HASH(0x89193a8)', 'TWiki::Meta=HASH(0x8adc730)', '%SPLIT%\x{a} * %KEY%: %VALUE%%SPLIT%\x{a}\x{a}---++ My Links\x{a}\x{a} * %TWI...') called at /usr/local/apache2/htdocs/twiki/lib/TWiki/UI/Register.pm line 839
TWiki::UI::Register::_createUserTopic('TWiki=HASH(0x806dd04)', 'NewUserTemplate', 'HASH(0x89193a8)') called at /usr/local/apache2/htdocs/twiki/lib/TWiki/UI/Register.pm line 800
TWiki::UI::Register::finish('TWiki=HASH(0x806dd04)', '/usr/local/apache2/htdocs/twiki/data/RegistrationApprovals') called at /usr/local/apache2/htdocs/twiki/lib/TWiki/UI/Register.pm line 97
TWiki::UI::Register::register_cgi('TWiki=HASH(0x806dd04)') called at /usr/local/apache2/htdocs/twiki/lib/TWiki/UI.pm line 109
TWiki::UI::__ANON__() called at /usr/local/apache2/htdocs/twiki/lib/CPAN/lib///Error.pm line 379
eval {...} called at /usr/local/apache2/htdocs/twiki/lib/CPAN/lib///Error.pm line 371
Error::subs::try('CODE(0x8999570)', 'HASH(0x81555fc)') called at /usr/local/apache2/htdocs/twiki/lib/TWiki/UI.pm line 158
TWiki::UI::run('CODE(0x876497c)') called
| 15 Jan 2007 - 17:53 | /usr/local/bin/rcs -i -t-none -ko %FILENAME|F% of .../Main/TomPeters.txt,v failed to create history file at /usr/local/apache2/htdocs/twiki/lib/TWiki/Store/RcsWrap.pm line 116.
I am stuck and not sure how to proceed.
Environment
--
ShivajiDutta - 16 Jan 2007
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 configure, check
{SafeEnvPath} and make sure it contains valid directories. Please close this question if this resolves the issue.
--
PeterThoeny - 16 Jan 2007
Thanks for the quick response. The issue with
RCS remains.
I keep getting the error on
RcsWrap.pm file stating it failed to create history file. The error points to line 116 of RCSWrap.pm file.
/usr/local/bin/rcs -i -t-none -ko %FILENAME|F% of .../Main/TestUser5.txt,v failed to create history file at /usr/local/apache2/htdocs/twiki/lib/TWiki/Store/RcsWrap.pm line 116., referer: http://xxx.xxx.xxx.xxx/twiki/bin/oops/Main/TWikiRegistration?template=oopsattention;def=confirm;param1=
Looking at the code for RCSWrap.pm arond 116 there is check for the existence of the file (Mainly for Windows). I am not sure if this is a bug for Solaris ( # Sometimes (on Windows?) rcs file not formed, so check for it). The files do get created I did check under data/Main directory.
my ( $rcsOutput, $exit ) =
$this->{session}->{sandbox}->sysCommand(
$TWiki::cfg{RCS}{initBinaryCmd}, FILENAME => $this->{file} );
if( $exit ) {
$rcsOutput ||= '';
throw Error::Simple( $TWiki::cfg{RCS}{initTextCmd}.
' of '.$this->_hidePath($this->{file}).
' failed: '.$rcsOutput );
} elsif( ! -e $this->{rcsFile} ) {
# Sometimes (on Windows?) rcs file not formed, so check for it
* throw Error::Simple( $TWiki::cfg{RCS}{initTextCmd}.
' of '.$this->_hidePath($this->{rcsFile}).
' failed to create history file ');*
}
Looking forward for your thoughts
--
ShivajiDutta - 16 Jan 2007
Just a wild guess: Since you are stating that the rcs file gets created and the exist check does not succeed, there might be a timing issue? Just for testing purposes, could you add a
sleep(1); just above the
if( $exit ) {
--
PeterThoeny - 16 Jan 2007
Hmm.. the rcsfiles are not getting created.
I think I got confused by seeing the other files which came with the installation. I tried to create new Group and this was the only entry for it in the data/Main folder.
-rw-r--r-- 1 daemon daemon 46 Jan 16 13:48
TeamedEcmGroup.lease
I also checked all the
SafeEnv paths and they seemed to be correct and no bad paths.
--
ShivajiDutta - 16 Jan 2007
Other guesses:
1. Check
{RCS}{useSubDir}, turn off if on.
2. Check the
RCS you are using. Make sure they are the ones compiled from the GNU tool. See
TWikiOnSolaris and
SolarisInstallCookbook.
3. In configure, check the parameters to the rcs commands, make sure your rcs understands all command line options.
--
PeterThoeny - 17 Jan 2007
I checked all three of the above.. still cannot get around this error.
=/usr/local/bin/rcs -i -t-none -ko %FILENAME% of .../Main/AbcGroup.txt,v failed to create history file =
--
ShivajiDutta - 18 Jan 2007
One more guess: Make sure the directories and files in
twiki/data and
twiki/pub are owned by the Apache user (such as
nobody or
www-run.)
--
PeterThoeny - 18 Jan 2007
Shivaji I am also facing same problem same error history can not be created but apart from that I am also facing another problem as just now I could manage to intall twiki and as stated in the installation document tried to open /bin/configure but it ask for a username and password ? I dont know if there is any default username and password is to be given plz help me
--
SwapnilShukla - 18 Feb 2007
In my case (Solaris) rcs was installed in /usr/local/bin/rcs, but TWiki uses /usr/bin/rcs by default, and does not check if it is available. So, the problem is to be solved by reconfiguring TWiki, but be attentive to change path to all rcs binaries (ci, co, etc)
--
AndriyZhdanov - 22 Mar 2007
I have the absolute path to
RCS commands and yet I have the same problem in TWiki 4.1.2. What did really happen to fix this problem, I complied with all the recommendation and yet I can not add a new group.
--
EskinderAMesfin - 30 Mar 2007
In the
Sandbox.pm module you will find a tracing option near the top of the file. Enable tracing, then reproduce the error. Open your apache error log, and find the command that the Sandbox was trying to execute when it failed. Copy that command, and paste it onto the shell command line. What happens?
--
CrawfordCurrie - 14 Apr 2007
Assuming this is now solved. Re-open if not.
--
PeterThoeny - 12 May 2007
I was also hit by this problem. Reading all the comments, I didn't get a clear idea on if and how this problem got resolved. Can anyone elaborate a bit more? thanks.
--
OliverWang - 17 Oct 2007
Sorry, closing this after more than 30 days of inactivity. Please feel free to re-open if needed.
--
PeterThoeny - 03 Dec 2007
I also got the same problem with
RCS. Found out that the folders in question were not owned by the "apache" process (Fedora core 8). To resolve this, I used
chown -R apache:apache twiki. Worked beautifully.
--
TWikiGuest - 21 Feb 2008
I had the same problem with Windows. Interestingly, I could edit existing topics but could not create new ones. That seems inconsistent with my theory that TWiki couldn't find
RCS.
In the configuration screen I changed
StoreImpl from
RcsWrap to
RcsLite; the error went away and everything seems to be working.
Doesn't explain the problem, and isn't a perfect solution...
--
ClifKussmaul - 10 Mar 2008
This error is happening to me when using
RcsWrap and prevents user registration, possibly more.
RcsLite works. It seems using
RcsWrap there is some permissions issue somewhere but I am still making sense of where. At the same second as the final error for saying Registration failed there is a series of
Insecure directory messages above the final error:
| 2009-08-25 - 11:56 | Registration failed: Insecure directory in $ENV{PATH} while running with -T switch at /opt/app/wiki/twiki/lib/TWiki/Sandbox.pm line 398.
Anyone know what this is right off?
Sorry if I am missing something obvious, but I read all the topics about excessive group permissions, etc and I don't see any in my install. My
RCS is a fresh complete GNU install with rcs and diffutils, etc.
--
MatthewStout - 2009-08-25
Matthew, in configure check
{SafeEnvPath} and make sure it contains valid directories.
--
PeterThoeny - 2009-08-25