[Bug 16974] New: koha-plack should check and fix log files permissions
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16974 Bug ID: 16974 Summary: koha-plack should check and fix log files permissions Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Command-line Utilities Assignee: gmcharlt@gmail.com Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org CC: robin@catalyst.net.nz It is not checking permissions and makes Koha fail badly if it cannot write the logs. This could happen on logrotate, on koha-plack --start|--restart. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16974 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |tomascohen@gmail.com Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16974 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16974 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 53714 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=53714&action=edit Bug 16974: Make koha-plack should check and fix log files permissions This patch adds a function to the koha-plack script so it checks for log file existence and its permissions. This function is called from the start_plack function. If some of this conditions are not fulfilled, it solves the situation by either touching and/or changing the permissions accordingly for the instances' plack log files. To test: - Run (on kohadevbox): $ cd kohaclone $ debian/scripts/koha-plack --start kohadev $ debian/scripts/koha-plack --stop kohadev $ ls /var/log/koha/kohadev/plack* - Verify ownership of the created files (they might belong to the root user) - Apply the patch - Run: $ chown root:root /var/log/koha/kohadev/plack* $ debian/scripts/koha-plack --start kohadev $ ls /var/log/koha/kohadev/plack* => SUCCESS: Files belong to kohadev-koha:kohadev-koha - Run: $ debian/scripts/koha-plack --stop kohadev $ rm /var/log/koha/kohadev/plack* $ debian/scripts/koha-plack --start kohadev $ ls /var/log/koha/kohadev/plack* => SUCCESS: Files are created and belong to kohadev-koha:kohadev-koha - Sign off :-D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16974 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=16138 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16974 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mirko@abunchofthings.net -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16974 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |barton@bywatersolutions.com | |, kyle@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16974 Mirko Tietgen <mirko@abunchofthings.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #53714|0 |1 is obsolete| | --- Comment #2 from Mirko Tietgen <mirko@abunchofthings.net> --- Created attachment 54319 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54319&action=edit Bug 16974: Make koha-plack should check and fix log files permissions This patch adds a function to the koha-plack script so it checks for log file existence and its permissions. This function is called from the start_plack function. If some of this conditions are not fulfilled, it solves the situation by either touching and/or changing the permissions accordingly for the instances' plack log files. To test: - Run (on kohadevbox): $ cd kohaclone $ debian/scripts/koha-plack --start kohadev $ debian/scripts/koha-plack --stop kohadev $ ls /var/log/koha/kohadev/plack* - Verify ownership of the created files (they might belong to the root user) - Apply the patch - Run: $ chown root:root /var/log/koha/kohadev/plack* $ debian/scripts/koha-plack --start kohadev $ ls /var/log/koha/kohadev/plack* => SUCCESS: Files belong to kohadev-koha:kohadev-koha - Run: $ debian/scripts/koha-plack --stop kohadev $ rm /var/log/koha/kohadev/plack* $ debian/scripts/koha-plack --start kohadev $ ls /var/log/koha/kohadev/plack* => SUCCESS: Files are created and belong to kohadev-koha:kohadev-koha - Sign off :-D Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16974 Mirko Tietgen <mirko@abunchofthings.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #3 from Mirko Tietgen <mirko@abunchofthings.net> --- It did not work from within koha-shell. Since I don't think it would be called from within koha-shell, I assume it is supposed to be like that. Just wanted to leave a note in case it isn't. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16974 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16974 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #54319|0 |1 is obsolete| | --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 54374 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54374&action=edit Bug 16974: Make koha-plack should check and fix log files permissions This patch adds a function to the koha-plack script so it checks for log file existence and its permissions. This function is called from the start_plack function. If some of this conditions are not fulfilled, it solves the situation by either touching and/or changing the permissions accordingly for the instances' plack log files. To test: - Run (on kohadevbox): $ cd kohaclone $ debian/scripts/koha-plack --start kohadev $ debian/scripts/koha-plack --stop kohadev $ ls /var/log/koha/kohadev/plack* - Verify ownership of the created files (they might belong to the root user) - Apply the patch - Run: $ chown root:root /var/log/koha/kohadev/plack* $ debian/scripts/koha-plack --start kohadev $ ls /var/log/koha/kohadev/plack* => SUCCESS: Files belong to kohadev-koha:kohadev-koha - Run: $ debian/scripts/koha-plack --stop kohadev $ rm /var/log/koha/kohadev/plack* $ debian/scripts/koha-plack --start kohadev $ ls /var/log/koha/kohadev/plack* => SUCCESS: Files are created and belong to kohadev-koha:kohadev-koha - Sign off :-D Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16974 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #5 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to master for 16.11, thanks Tomas! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16974 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |frederic@tamil.fr Status|Pushed to Master |Pushed to Stable --- Comment #6 from Frédéric Demians <frederic@tamil.fr> --- Pushed in 16.05. Will be in 16.05.03. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16974 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |julian.maurice@biblibre.com --- Comment #7 from Julian Maurice <julian.maurice@biblibre.com> --- Pushed to 3.22.x, will be in 3.22.10 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org