[Koha] Install Koha on AlmaLinux 8

Alessandro Tedesco alessandrotedesco at seminario.milano.it
Sat Apr 23 22:52:39 NZST 2022


Hi Alvaro,

it seems that the nobody user is used to start the httpd on my AlmaLinux
--------------------------------------------
# ps -ef | grep -i nobody
nobody      2389     830  0 12:29 ?        00:00:00 /usr/sbin/httpd -k start
nobody      2390     830  0 12:29 ?        00:00:00 /usr/sbin/httpd -k start
nobody      2391     830  0 12:29 ?        00:00:00 /usr/sbin/httpd -k start
nobody      2392     830  0 12:29 ?        00:00:00 /usr/sbin/httpd -k start
nobody      2393     830  0 12:29 ?        00:00:00 /usr/sbin/httpd -k start
nobody      2395     830  0 12:29 ?        00:00:00 /usr/sbin/httpd -k start
nobody      2396     830  0 12:29 ?        00:00:00 /usr/sbin/httpd -k start
root        2589    1366  0 12:32 pts/0    00:00:00 grep --color=auto -i
nobody
--------------------------------------------

And the only solution that I have found to workaround the permission issue
is to assign the /var/log/koha file to this user and group:
--------------------------------------------
-rw-r--r-- 1 koha   koha         17 Mar 25 11:27 README
-rw-r--r-- 1 nobody nobody        0 Apr 22 15:54 api-error.log
-rw-r--r-- 1 nobody nobody        0 Apr 22 15:54 intranet-error.log
-rw-r--r-- 1 koha   koha    3568410 Apr 23 12:49 koha-error_log
-rw-r--r-- 1 koha   koha   16798473 Apr 23 12:49 koha-opac-error_log
-rw-r--r-- 1 koha   koha      34650 Apr 22 12:09 koha-zebradaemon-output.log
-rw-r--r-- 1 koha   koha      41328 Apr 22 12:09 koha-zebradaemon.err
-rw-r--r-- 1 nobody nobody        0 Apr 22 15:54 opac-error.log
-rw-r--r-- 1 nobody nobody        0 Apr 22 15:54 plack-api-error.log
-rw-r--r-- 1 nobody nobody        0 Apr 22 15:54 plack-intranet-error.log
-rw-r--r-- 1 nobody nobody        0 Apr 22 15:54 plack-opac-error.log
-rw-r--r-- 1 nobody nobody        0 Apr 22 15:54 sip.log
-rw-r--r-- 1 nobody nobody        0 Apr 22 15:54 z3950-error.log
--------------------------------------------

Is this a reasonable and secure solution?

Thanks and have a nice day!
Alessandro

Il giorno sab 23 apr 2022 alle ore 11:36 Alessandro Tedesco <
alessandrotedesco at seminario.milano.it> ha scritto:

> Hi Alvaro,
>
> thanks again!
> I have reset the permission and I have tried to do as you suggested, but
> (probably for my mistake in some passages) it doesn't work.
>
> So, tring to open the Koha Administration Panel from browser and checking
> with "# top" command in shell, I have found that the user nobody run the
> process that try to connect to Koha Administration Panel:
> ------------------------------------------
> PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
> 95823 nobody    20   0       0      0      0 Z  67.1   0.0   0:02.49
> mainpage.pl
> 95824 nobody    20   0  133084  29536   9608 D   8.6   0.3   0:00.26
> 500.pl
> ------------------------------------------
>
> So, I have add the user nobody to the koha group:
> ------------------------------------------
> # usermod -a -G koha nobody
> # id nobody
> # uid=65534(nobody) gid=65534(nobody) groups=1002(koha),65534(nobody)
> ------------------------------------------
>
> And then set the permission of the var/log/koha files as follow (664 for
> the log file that generate the error in koha-error_log):
> ------------------------------------------
> -rw-r--r-- 1 koha koha       17 Mar 25 11:27 README
> -rw-rw-r-- 1 koha koha        0 Apr 22 15:54 api-error.log
> -rw-rw-r-- 1 koha koha        0 Apr 22 15:54 intranet-error.log
> -rw-r--r-- 1 koha koha  3562776 Apr 23 11:25 koha-error_log
> -rw-r--r-- 1 koha koha 16797737 Apr 23 11:21 koha-opac-error_log
> -rw-r--r-- 1 koha koha    34650 Apr 22 12:09 koha-zebradaemon-output.log
> -rw-r--r-- 1 koha koha    41328 Apr 22 12:09 koha-zebradaemon.err
> -rw-rw-r-- 1 koha koha        0 Apr 22 15:54 opac-error.log
> -rw-rw-r-- 1 koha koha        0 Apr 22 15:54 plack-api-error.log
> -rw-rw-r-- 1 koha koha        0 Apr 22 15:54 plack-intranet-error.log
> -rw-rw-r-- 1 koha koha        0 Apr 22 15:54 plack-opac-error.log
> -rw-rw-r-- 1 koha koha        0 Apr 22 15:54 sip.log
> -rw-rw-r-- 1 koha koha        0 Apr 22 15:54 z3950-error.log
> ------------------------------------------
>
> However I continue to get the 500 error when I try to connect to the Koha
> Administration Panel and checkin the koha-error_log file I get the same
> permission error:
> ------------------------------------------
> Can't open /var/log/koha/z3950-error.log (Permission denied) at
> /usr/share/perl5/vendor_perl/Log/Log4perl/Appender/File.pm line 151.:
> /usr/share/koha/intranet/cgi-bin/mainpage.pl
> End of script output before headers: mainpage.pl
> Can't open /var/log/koha/z3950-error.log (Permission denied) at
> /usr/share/perl5/vendor_perl/Log/Log4perl/Appender/File.pm line 151.:
> /usr/share/koha/intranet/cgi-bin/errors/500.pl
> End of script output before headers: 500.pl
>  ------------------------------------------
>
> Do you see something that I have miss?
>
> Thanks and have a nice day!
> Alessandro
>
> Il giorno ven 22 apr 2022 alle ore 18:17 Alvaro Cornejo <
> cornejo.alvaro at gmail.com> ha scritto:
>
>> Hi Alessandro,
>>
>> Good to know it worked.
>>
>> No, usually it is best to limit file access to who needs it.
>>
>> As per your files listed below, koha user and group should be the only
>> ones allowed to write to those files. As you are running AlmaLinux, it
>> might be that a process is running under another user. thus, the permission
>> error.
>>
>> You can try to identify who that process is and have it run as a koha
>> user or add that user to the koha group.
>>
>> Regards,
>>
>> Alvaro,
>>
>>
>>
>> |----------------------------------------------------------------------------------------|
>>  Stay safe / Cuídate/  Reste sécurisé
>> *7* Switch off as you go / Apaga lo que no usas /  Débranchez au fur et
>> à mesure.
>>  *q *Recycle always / Recicla siempre / Recyclez toujours
>>  P Print only if absolutely necessary / Imprime solo si es necesario /
>> Imprimez seulement si nécessaire
>>
>>
>> Le ven. 22 avr. 2022 à 10:37, Alessandro Tedesco <
>> alessandrotedesco at seminario.milano.it> a écrit :
>>
>>> Hi Alvaro,
>>>
>>> thank you very much for your reply!
>>>
>>> I have changed the /var/log/koha files permission as follow (see below),
>>> and now I have managed to enter Koha Administration Panel!
>>> Only one question: is it safe to keep all these file in chmod 666?
>>> ------------
>>> -rw-r--r-- 1 koha koha       17 Mar 25 11:27 README
>>> -rw-rw-rw- 1 koha koha        0 Apr 22 15:54 api-error.log
>>> -rw-rw-rw- 1 koha koha        0 Apr 22 15:54 intranet-error.log
>>> -rw-r--r-- 1 koha koha  3526260 Apr 22 17:32 koha-error_log
>>> -rw-r--r-- 1 koha koha 16758525 Apr 22 17:32 koha-opac-error_log
>>> -rw-r--r-- 1 koha koha    34650 Apr 22 12:09 koha-zebradaemon-output.log
>>> -rw-r--r-- 1 koha koha    41328 Apr 22 12:09 koha-zebradaemon.err
>>> -rw-rw-rw- 1 koha koha        0 Apr 22 15:54 opac-error.log
>>> -rw-rw-rw- 1 koha koha        0 Apr 22 15:54 plack-api-error.log
>>> -rw-rw-rw- 1 koha koha        0 Apr 22 15:54 plack-intranet-error.log
>>> -rw-rw-rw- 1 koha koha        0 Apr 22 15:54 plack-opac-error.log
>>> -rw-rw-rw- 1 koha koha        0 Apr 22 15:54 sip.log
>>> -rw-rw-rw- 1 koha koha        0 Apr 22 15:54 z3950-error.log
>>> ------------
>>> Thanks and have a nice day!
>>> Alessandro
>>>
>>>
>>> Il giorno ven 22 apr 2022 alle ore 17:03 Alvaro Cornejo <
>>> cornejo.alvaro at gmail.com> ha scritto:
>>>
>>>> Hi Alessandro,
>>>>
>>>> Have you checked the permission of your log
>>>> file  /var/log/koha/z3950-error.log ?
>>>>
>>>> You might need to change it and give it write access to everybody.
>>>>
>>>> Regards,
>>>>
>>>> Alvaro
>>>>
>>>>
>>>> |----------------------------------------------------------------------------------------|
>>>>  Stay safe / Cuídate/  Reste sécurisé
>>>> *7* Switch off as you go / Apaga lo que no usas /  Débranchez au fur
>>>> et à mesure.
>>>>  *q *Recycle always / Recicla siempre / Recyclez toujours
>>>>  P Print only if absolutely necessary / Imprime solo si es necesario /
>>>> Imprimez seulement si nécessaire
>>>>
>>>>
>>>> Le ven. 22 avr. 2022 à 09:49, Alessandro Tedesco <
>>>> alessandrotedesco at seminario.milano.it> a écrit :
>>>>
>>>>> Hi,
>>>>>
>>>>> I have workedaround the Onboarding Web Installer issues in creating
>>>>> Superlibrarian Patron with the "create_superlibrarian.pl" and now I
>>>>> have
>>>>> finished the Web Installation process.
>>>>>
>>>>> However, when I try to connect to the Koha administration panel, I get
>>>>> the
>>>>> 500 Internal Server Error; and again, the only error that I see in
>>>>> /var/log/
>>>>> koha/koha-error_log is related to z3950:
>>>>> -------------------------
>>>>> Can't open /var/log/koha/z3950-error.log (Permission denied) at
>>>>> /usr/share/perl5/vendor_perl/Log/Log4perl/Appender/File.pm line 151.:
>>>>> /usr/share/koha/intranet/cgi-bin/mainpage.pl
>>>>> End of script output before headers: mainpage.pl
>>>>> Can't open /var/log/koha/z3950-error.log (Permission denied) at
>>>>> /usr/share/perl5/vendor_perl/Log/Log4perl/Appender/File.pm line 151.:
>>>>> /usr/share/koha/intranet/cgi-bin/errors/500.pl
>>>>> End of script output before headers: 500.pl
>>>>> -------------------------
>>>>> Does anyone have any idea how to try to fix it?
>>>>>
>>>>> Thanks and have a nice day!
>>>>> Alessandro
>>>>>
>>>>> Il giorno ven 22 apr 2022 alle ore 13:17 Alessandro Tedesco <
>>>>> alessandrotedesco at seminario.milano.it> ha scritto:
>>>>>
>>>>> > Hi,
>>>>> >
>>>>> > checking /var/log/koha/koha-error_log, I found that the only error
>>>>> > generated when I try to create the Superlibrarian with the
>>>>> Onboarding Web
>>>>> > Installer is:
>>>>> > ----------------
>>>>> > Can't open /var/log/koha/z3950-error.log (Permission denied) at
>>>>> > /usr/share/perl5/vendor_perl/Log/Log4perl/Appender/File.pm line 151.
>>>>> at
>>>>> > /usr/share/koha/lib/Koha/Patron.pm line 355:
>>>>> > /usr/share/koha/intranet/cgi-bin/installer/onboarding.pl
>>>>> > ----------------
>>>>> > Can be a issues related to Z3950?
>>>>> >
>>>>> > Thanks and have a nice day!
>>>>> > Alessandro
>>>>> >
>>>>> >
>>>>> > Il giorno gio 21 apr 2022 alle ore 13:09 Alessandro Tedesco <
>>>>> > alessandrotedesco at seminario.milano.it> ha scritto:
>>>>> >
>>>>> >> Hi,
>>>>> >>
>>>>> >> I have finally installed Koha 21.11.04 on AlmaLinux 8 and I was
>>>>> able to
>>>>> >> start the Web Installer.
>>>>> >>
>>>>> >> Everything seems to be working fine.
>>>>> >>
>>>>> >> However, when I get to the creation of the "Koha Administrator
>>>>> Patron"
>>>>> >> (in Onboarding section), after filling in all the required data, I
>>>>> always
>>>>> >> get this error message: "The patron has not been created!
>>>>> Cardnumber or
>>>>> >> Userid may already exist." and I cannot proceed with the Web
>>>>> Installer.
>>>>> >>
>>>>> >> Does anyone have an idea what can cause this issue?
>>>>> >>
>>>>> >> Thanks and have a nice day!
>>>>> >> Alessandro
>>>>> >>
>>>>> >> *Alessandro Tedesco, Ph.D.*
>>>>> >>
>>>>> >> Direttore della Biblioteca "Cardinale Carlo Maria Martini" del
>>>>> Seminario
>>>>> >> Arcivescovile di Milano
>>>>> >>
>>>>> >> Via Pio XI, 32 – 21040 Venegono Inferiore (VA) |
>>>>> >> www.BibliotecaSeminarioMilano.it <
>>>>> https://bibliotecaseminariomilano.it/>
>>>>> >>
>>>>> >> *E-mail:* alessandrotedesco at seminario.milano.it
>>>>> >>
>>>>> >> *Tel.:* +39 0331 867 610
>>>>> >>
>>>>> >>
>>>>> >> Il giorno mar 19 apr 2022 alle ore 01:55 <dcook at prosentient.com.au>
>>>>> ha
>>>>> >> scritto:
>>>>> >>
>>>>> >>> It's certainly possible to install Koha on AlmaLinux, but it will
>>>>> >>> probably be a challenging experience, as the main community
>>>>> supported
>>>>> >>> installation is using Debian packages on Debian/Ubuntu.
>>>>> >>>
>>>>> >>> In the past, I used to run a customized version of Koha on OpenSUSE
>>>>> >>> using RPM packages. That made code deployments much easier. My
>>>>> spec file
>>>>> >>> wouldn't be directly usable, but I could provide some advice, if
>>>>> you went
>>>>> >>> down that route.
>>>>> >>>
>>>>> >>> For Perl dependencies, as Tomas says, you'd want to use the
>>>>> cpanfile. (
>>>>> >>> https://metacpan.org/dist/Module-CPANfile/view/lib/cpanfile.pod
>>>>> and
>>>>> >>> https://metacpan.org/pod/cpanm).
>>>>> >>>
>>>>> >>> Docker could be an option, but I wouldn't suggest it unless you're
>>>>> >>> already familiar with using Docker.
>>>>> >>>
>>>>> >>> Your main challenges with AlmaLinux would probably be installing
>>>>> the
>>>>> >>> Perl dependencies, configuring Apache, setting up cronjobs, and
>>>>> setting up
>>>>> >>> services (Zebra indexer, Zebra search server, Plack application
>>>>> server).
>>>>> >>> You get all of that for free with the Debian packages, but have to
>>>>> do it
>>>>> >>> manually with other installation methods.
>>>>> >>>
>>>>> >>> David Cook
>>>>> >>> Senior Software Engineer
>>>>> >>> Prosentient Systems
>>>>> >>> Suite 7.03
>>>>> >>> 6a Glen St
>>>>> >>> Milsons Point NSW 2061
>>>>> >>> Australia
>>>>> >>>
>>>>> >>> Office: 02 9212 0899
>>>>> >>> Online: 02 8005 0595
>>>>> >>>
>>>>> >>> -----Original Message-----
>>>>> >>>
>>>>> >>> Date: Fri, 15 Apr 2022 11:53:03 -0300
>>>>> >>> From: Tomas Cohen Arazi <tomascohen at gmail.com>
>>>>> >>> To: Alessandro Tedesco <alessandrotedesco at seminario.milano.it>
>>>>> >>> Cc: koha <koha at lists.katipo.co.nz>
>>>>> >>> Subject: Re: [Koha] Install Koha on AlmaLinux 8
>>>>> >>> Message-ID:
>>>>> >>>         <CABZfb=Vh7Z0f_bcMa3sY1=tjL9rUUk=
>>>>> >>> bnFioTVGUEcd-pHKaXw at mail.gmail.com>
>>>>> >>> Content-Type: text/plain; charset="UTF-8"
>>>>> >>>
>>>>> >>> The Koha source code contains a cpanfile, which can be used to
>>>>> pull the
>>>>> >>> perl dependencies.
>>>>> >>>
>>>>> >>> The rest should be an old school dev install.
>>>>> >>>
>>>>> >>> I think the instructions you were given should work for most of it.
>>>>> >>>
>>>>> >>> El mié, 13 abr 2022 9:48, Alessandro Tedesco <
>>>>> >>> alessandrotedesco at seminario.milano.it> escribió:
>>>>> >>>
>>>>> >>> > Hi all,
>>>>> >>> >
>>>>> >>> > I have to install Koha on AlmaLinux 8 and I wonder if anyone has
>>>>> tried
>>>>> >>> > to do such a thing, or if anyone can suggest some documentation.
>>>>> >>> >
>>>>> >>> > Thanks and have a good day!
>>>>> >>> >
>>>>> >>> > Alessandro
>>>>> >>>
>>>>> >>> _______________________________________________
>>>>> >>>
>>>>> >>> Koha mailing list  http://koha-community.org
>>>>> >>> Koha at lists.katipo.co.nz
>>>>> >>> Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
>>>>> >>>
>>>>> >>
>>>>> _______________________________________________
>>>>>
>>>>> Koha mailing list  http://koha-community.org
>>>>> Koha at lists.katipo.co.nz
>>>>> Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
>>>>>
>>>>


More information about the Koha mailing list