Bug 744405 - PHP update changes permissions of /var/lib/php/session/
Summary: PHP update changes permissions of /var/lib/php/session/
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: php
Version: 15
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Joe Orton
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-10-08 12:09 UTC by Philipp Gampe
Modified: 2012-09-17 15:47 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-07 16:38:06 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Philipp Gampe 2011-10-08 12:09:29 UTC
Description of problem:
PHP update changes permissions of /var/lib/php/session/.
It is set back to root:apache.

Version-Release number of selected component (if applicable):
php-5.3.8-1.fc15.x86_64

How reproducible:
Install latest update

Steps to Reproduce:
1. let apache (httpd) run as a different user and group
2. set everything up, e.g. set /var/lib/php/session/ to the configured group
3. update php
4. ls -la /var/lib/php/
  
Actual results:
drwxrwx---. 2 root apache 20480  8. Okt 13:44 session

Expected results:
drwxrwx---. 2 root mygroup 20480  8. Okt 13:44 session

Additional info:
It could of course be a sub package of php (php-*). I did not check that, I just replayed the update.
This problem exist since longer, because I remember having it with the last update too.

This is especially annoying of you set up automatic update, because this will break your application (if it uses sessions). On a dev system, I expect my application to break and to not think about such stupid thing.

Comment 1 James Kennedy 2012-06-26 22:19:33 UTC
This is related with two other bug reports:
https://bugzilla.redhat.com/show_bug.cgi?id=698086
https://bugzilla.redhat.com/show_bug.cgi?id=680056

There is a "universal" solution which I think could be easily implemented on the PHP package.

Looking at the spec file, there are two lines which relate to this:
  install -m 700 -d $RPM_BUILD_ROOT%{_localstatedir}/lib/php/session
  %attr(0770,root,apache) %dir %{_localstatedir}/lib/php/session

Would there be any problem with changing the first line to:
  install -o root -g apache -m 700 -d $RPM_BUILD_ROOT%{_localstatedir}/lib/php/session
The second line can then be removed. With this change, when PHP is set up and configured the session dir owner/group can be changed to whatever the admin wants, and subsequent updates to the PHP package will not override the change.

Comment 2 Philipp Gampe 2012-06-27 02:04:59 UTC
I am not into RPM building, but that sounds good.

I also like the idea of #680056 (using a generic webserver group), but once again, please do not touch permissions on upgrades if you do not have to.

I do not expect an upgrade which should just change a few binary files to mess with my configuration (permissions, etc.).

Comment 3 James Kennedy 2012-07-19 22:04:47 UTC
@Joe Orton : Can you judge whether my suggestion above a useful solution to these issues?

Comment 4 Fedora End Of Life 2012-08-07 16:38:08 UTC
This message is a notice that Fedora 15 is now at end of life. Fedora
has stopped maintaining and issuing updates for Fedora 15. It is
Fedora's policy to close all bug reports from releases that are no
longer maintained. At this time, all open bugs with a Fedora 'version'
of '15' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this
occurring, but we forgot to do that. A thousand apologies.)

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

Bug Reporter: Thank you for reporting this issue and we are sorry that
we were unable to fix it before Fedora 15 reached end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora, you are encouraged to click on
"Clone This Bug" (top right of this page) and open it against that
version of Fedora.

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 Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

The process we are following is described here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 5 James Kennedy 2012-08-07 19:13:31 UTC
Can this bug be updated to be against fedora rawhide instead? There is no sense in having to recreate it.

Comment 6 Remi Collet 2012-09-17 15:47:54 UTC
Each process owner need to own its session directory.

Apache one is /var/lib/php/session.

Starting with php 5.4.7-2, this value is set from
/etc/httpd/conf.d/php.conf
/etc/php-fpm.d/*conf


Note You need to log in before you can comment on or make changes to this bug.