From:             jrod at blacknode dot net
Operating system: RHEL4 i386
PHP version:      5.2.5
PHP Bug Type:     Session related
Bug description:  session.save_path MODE will not set write bit

Description:
------------
bug #42596 (http://bugs.php.net/bug.php?id=42596) is not fixed in php
5.2.5. Setting the session.save_path variable still does not set the write
bit on group or world when the mode is specified like so
0;0660;/var/lib/php/session.


Reproduce code:
---------------
session.save_path = 0;0660;/var/lib/php/session

Session test script:
<?
session_start();
// Use $HTTP_SESSION_VARS with PHP 4.0.6 or less
if (!isset($_SESSION['count'])) {
    $_SESSION['count'] = 0;
} else {
    $_SESSION['count']++;
}

        print('Count: ' . $_SESSION['count']);
?>




Expected result:
----------------
Sessions should be created with 660 permissions:

-rw-rw----  1 apache session      0 Feb  8 22:41
sess_antgke265hvd98pimudnu1gk30
-rw-rw----  1 apache session      0 Feb  8 18:43
sess_fm3l3rumegt8gkof285ft68pj4
-rw-rw----  1 apache session      0 Feb  8 18:42
sess_v94jcs3ks7df71p755686s6p67

Actual result:
--------------
Sessions created with mod_php

-rw-r-----  1 apache session      0 Feb  8 22:41
sess_antgke265hvd98pimudnu1gk30
-rw-r-----  1 apache session      0 Feb  8 18:43
sess_fm3l3rumegt8gkof285ft68pj4
-rw-r-----  1 apache session      0 Feb  8 18:42
sess_v94jcs3ks7df71p755686s6p67

Sessions created with mod_suphp:

drwxrws---  2 root      session 651264 Feb  8 23:10 .
drwxr-xr-x  3 root      root      4096 Nov 19 18:28 ..
-rw-rw----  1 adm_suphp session     10 Feb  8 23:09
sess_0bico36eatq7l6lmnb23n93gj4
-rw-rw----  1 adm_suphp session     10 Feb  8 23:10
sess_375iktr5nmu7eccbh063aj0nn5
-rw-rw----  1 adm_suphp session     10 Feb  8 23:10
sess_9kbvgjtdhq290ojuoumcg712m5

-- 
Edit bug report at http://bugs.php.net/?id=44079&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=44079&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=44079&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=44079&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=44079&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=44079&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=44079&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=44079&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=44079&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=44079&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=44079&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=44079&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=44079&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=44079&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=44079&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=44079&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=44079&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=44079&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=44079&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=44079&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=44079&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=44079&r=mysqlcfg

Reply via email to