This question about Installation of Foswiki: Asked

Could not do LocalSite.cfg: Permission denied

Problem:

I'm trying to move my foswiki instance from a debian virtual machine to a docker machine. I've got a container running the latest version of Apache HTTP with all of the config with it. I've coped the /var/www/foswiki contents to this container and when i try browse to the new instance i receive this error:

Content-type: text/plain

Could not do LocalSite.cfg: Permission denied
Please inform the site admin.
 at /usr/share/perl5/CGI/Carp.pm line 362.
   CGI::Carp::realdie("Content-type: text/plain\x{a}\x{a}Could not do LocalSite.cfg: Permiss"...) called at /usr/share/perl5/CGI/Carp.pm line 454
   CGI::Carp::die("Content-type: text/plain\x{a}\x{a}Could not do LocalSite.cfg: Permiss"...) called at /var/www/foswiki/lib/Foswiki/Configure/Load.pm line 155
   Foswiki::Configure::Load::readConfig(0, 0, 0) called at /var/www/foswiki/lib/Foswiki.pm line 362
   Foswiki::BEGIN() called at /var/www/foswiki/lib/Foswiki.pm line 654
   eval {...} called at /var/www/foswiki/lib/Foswiki.pm line 654
   require Foswiki.pm called at /var/www/foswiki/bin/view line 28
   main::BEGIN() called at /var/www/foswiki/lib/Foswiki.pm line 654
   eval {...} called at /var/www/foswiki/lib/Foswiki.pm line 654
BEGIN failed--compilation aborted at /var/www/foswiki/lib/Foswiki.pm line 654.
 at /var/www/foswiki/lib/Foswiki.pm line 654.
   require Foswiki.pm called at /var/www/foswiki/bin/view line 28
   main::BEGIN() called at /var/www/foswiki/lib/Foswiki.pm line 654
   eval {...} called at /var/www/foswiki/lib/Foswiki.pm line 654
Compilation failed in require at /var/www/foswiki/bin/view line 28.
 at /var/www/foswiki/bin/view line 28.
   main::BEGIN() called at /var/www/foswiki/bin/view line 28
   eval {...} called at /var/www/foswiki/bin/view line 28
BEGIN failed--compilation aborted at /var/www/foswiki/bin/view line 28.
 at /var/www/foswiki/bin/view line 28.

I've checked the permissions of /var/www/foswiki/lib/LocalSite.cfg and it is writable via apache (it's the same permission as on the VM). I also ran the fix_file_permissions.sh script. Any suggestions?

Solution:

It actually a permission issue, still trying to work out the details but the process didnt have the correct permissions

You have probably found the issue but if not, some distros of Linux use SELINUX which requires a -Z when starting with a volume to properly sort the permissions

-- TimothyLegge - 13 Oct 2019
 

QuestionForm edit

Subject Installation of Foswiki
Extension
Version
Status Asked
Related Topics
Topic revision: r3 - 13 Oct 2019, TimothyLegge
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