This question about Installation of Foswiki: Answered

Software error

Hi Team,

After deployment of Foswiki pakage and generating the foswiki.conf file from Apacheconfiggenerator,I got welcome to Foswiki page. But while trying to enter the /bin/view path, i am getting the below error

Tried all possible solution given in the support and FAQ, but cant able to solve the issue. Request you to kinldy help me to proceed further.

Software error:

ERROR: Could not open logfile /extrnapps/foswiki/working/logs/error.log for write. Your admin should repair file or directory access permissions and/or ownership!
 at /usr/share/perl5/vendor_perl/CGI/Carp.pm line 378.
	CGI::Carp::realdie('ERROR: Could not open logfile /extrnapps/foswiki/working/logs...') called at /usr/share/perl5/vendor_perl/CGI/Carp.pm line 467
	CGI::Carp::die('ERROR: Could not open logfile /extrnapps/foswiki/working/logs...') called at /extrnapps/foswiki/lib/Foswiki/Logger/PlainFile.pm line 147
	Foswiki::Logger::PlainFile::log('Foswiki::Logger::PlainFile=HASH(0x1f24a60)', 'warning', 'ERROR: Could not open logfile /extrnapps/foswiki/working/logs...') called at /extrnapps/foswiki/lib/Foswiki/UI.pm line 475
	Foswiki::UI::__ANON__('Error::Simple=HASH(0x1e49ee8)', 'SCALAR(0xae65c8)') called at /usr/share/perl5/vendor_perl/Error.pm line 343
	eval {...} called at /usr/share/perl5/vendor_perl/Error.pm line 333
	Error::subs::run_clauses('HASH(0x192f180)', 'ERROR: Could not open logfile /extrnapps/foswiki/working/logs...', undef, 'ARRAY(0xae6b80)') called at /usr/share/perl5/vendor_perl/Error.pm line 430
	Error::subs::try('CODE(0x836c70)', 'HASH(0x192f180)') called at /extrnapps/foswiki/lib/Foswiki/UI.pm line 500
	Foswiki::UI::_execute('Foswiki::Request=HASH(0x83dcf8)', 'CODE(0x1097fb8)', 'view', 1) called at /extrnapps/foswiki/lib/Foswiki/UI.pm line 326
	Foswiki::UI::handleRequest('Foswiki::Request=HASH(0x83dcf8)') called at /extrnapps/foswiki/lib/Foswiki/Engine/CGI.pm line 100
	Foswiki::Engine::CGI::run('Foswiki::Engine::CGI=HASH(0x118cd88)') called at /extrnapps/foswiki/bin/view line 30.

For help, please send mail to the webmaster (webmaster@10.13.24.12), giving this error message and the time and date of the error.

-- SenthilSubu - 07 Jul 2021

Just judging by the beginning of the error message, I would start with confirming that your Foswiki installation is owned by whatever is your server user (e.g. www-data).

-- LynnwoodBrown - 08 Jul 2021

Hi Lynn, I am using root user and hence Foswiki installation is owned by is root.

-- SenthilSubu - 09 Jul 2021

Ok, that makes sense but what is the server user? Typically it would not be root so might not have write privileges for the installation directory.

-- LynnwoodBrown - 09 Jul 2021

Hi Lynn, Since i am using RedHat I tried initially apache as user and group but no luck. Then i tried to keep root as user and group but it also not worked.

-- SenthilSubu - 12 Jul 2021

I am not very familiar with RedHat servers but doing a quick search indicates that there are several options about what the httpd user is. However it seems it's extremely unlikely that root would be acceptable because of security implications. Apparently suexec is a common setup with RedHat so you might find it convenient to use that option. I also see mentioned httpd_sys_content_t but I'm not at all familiar with that. You might also try this command to see what your httpd user is: sudo ps aux | egrep '(apache|httpd)'. Basically, this is something you need to figure out from researching RedHat servers.

-- LynnwoodBrown - 12 Jul 2021

You can try Foswiki's bult-in fix_file_permissions.sh shell script. Open a shell window and change the directory (cd) to the root of your foswiki installation. Then execute the shell script: ./tools/fix_file_permissions.sh

-- StijnBousard - 18 Aug 2021

I'm moving my Office wiki (once more) from a Windows to a Linux (Debian) machine, and I got the exact same message.

Changing ownership of the foswiki directory gave me a working foswiki. I first checked the apache user:

userx@my-server:/srv$ sudo ps ax o cmd,user,group | egrep '(apache|httpd)'
/usr/sbin/apache2 -k restar www-data www-data
/usr/sbin/apache2 -k restar www-data www-data
/usr/sbin/apache2 -k restar www-data www-data
/usr/sbin/apache2 -k restar www-data www-data
/usr/sbin/apache2 -k restar root     root

Then I changed the ownership of the foswiki tree accordingly:

cd /srv/foswiki
sudo chown -R www-data:www-data *
cd ..
sudo chown www-data:www-data foswiki

-- StijnBousard - 30 Nov 2021
 

QuestionForm edit

Subject Installation of Foswiki
Extension
Version Foswiki 2.1.6
Status Answered
Related Topics
I Attachment Action Size Date Who Comment
foswiki.conf.txttxt foswiki.conf.txt manage 7 K 07 Jul 2021 - 10:58 SenthilSubu  
Topic revision: r9 - 30 Nov 2021, StijnBousard
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