Bug 22790

Summary: Config files can't be written, chowning /usr/share/pmb to apache user fixes the problem
Product: Mageia Reporter: Daniel Tartavel <contact>
Component: RPM PackagesAssignee: Nicolas Lécureuil <mageia>
Status: RESOLVED WONTFIX QA Contact:
Severity: critical    
Priority: Normal CC: marja11, ouaurelien
Version: 6   
Target Milestone: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Source RPM: pmb-4.2.10-1.mga6.src.rpm CVE:
Status comment:

Description Daniel Tartavel 2018-03-17 13:58:06 CET
Description of problem:
PMB can't write its config files and temporay files in its directory due to the fact they are root and not to apache user

Version-Release number of selected component (if applicable):

4.2.10

How reproducible:
Install pmb go to install page http:/localhost/pmb/tables/install.php
after configuration finished, the config files does not exits.
after making the 2 config files, pmb start but some error messages saying that it can not write to ./temp/
Comment 1 Daniel Tartavel 2018-03-17 13:59:45 CET
resolving bug in chowning /usr/share/pmb to apache user
Comment 2 Marja Van Waes 2018-03-17 17:19:15 CET
Assigning to the registered pmb maintainer

Assignee: bugsquad => mageia
CC: (none) => marja11
Summary: Write problems => Config files can't be written, chowning /usr/share/pmb to apache user fixes the problem

Comment 3 David Walser 2018-03-17 20:26:58 CET
What file(s) get created after the chown?  chown'ing isn't the solution for package as it should not be writing to /usr.  Symlinks should be placed there pointing to /etc where it will be writable, like what I did in the mediawiki package.
Comment 4 Daniel Tartavel 2018-03-20 21:32:01 CET
These 2 files are created during configuration:

/usr/share/pmb/includes/config.inc.php
/usr/share/pmb/opac_css/includes/opac_config.inc.php
Comment 5 Nicolas Lécureuil 2018-03-29 15:16:29 CEST
(In reply to Daniel Tartavel from comment #4)
> These 2 files are created during configuration:
> 
> /usr/share/pmb/includes/config.inc.php
> /usr/share/pmb/opac_css/includes/opac_config.inc.php


David, what do you suggest then ?
Comment 6 Daniel Tartavel 2019-04-08 12:54:16 CEST
hi,

already valid in Mageia 6

Librement,
Comment 7 Aurelien Oudelet 2020-08-16 23:03:11 CEST
Sorry,

Program, server or what ever software should not write data in /usr tree.
Best place is in /etc for config files and /var for variables datas.

So resolving WONTFIX, also, against a Mageia 6 EOL Bug.

Mageia 6 changed to end-of-life (EOL) status on 2019-09-30. It is no longer 
maintained, which means that it will not receive any further security or bug 
fix updates.

Package Maintainer: If you wish for this bug to remain open because you plan 
to fix it in a currently maintained version, simply change the 'version' to 
a later Mageia version.

Bug Reporter: Thank you for reporting this issue and we are sorry that we 
weren't able to fix it before Mageia 6's end of life. If you are able to 
reproduce it against a later version of Mageia, you are encouraged to click 
on "Version" and change it against that version of Mageia.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a more recent
Mageia release includes newer upstream software that fixes bugs or makes them
obsolete.

If you would like to help fixing bugs in the future, don't hesitate to join the
packager team via our mentoring program [1] or join the teams that fit you 
most [2].

[1] https://wiki.mageia.org/en/Becoming_a_Mageia_Packager
[2] http://www.mageia.org/contribute/

Best regards,
Aurélien
Bugsquad Team

Status: NEW => RESOLVED
CC: (none) => ouaurelien
Resolution: (none) => WONTFIX