#44079 [Fbk->Csd]: session.save_path MODE will not set write bit

From: Date: Tue, 12 Feb 2008 20:50:38 +0000
Subject: #44079 [Fbk->Csd]: session.save_path MODE will not set write bit
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-122203@lists.php.net to get a copy of this message
ID: 44079 User updated by: jrod at blacknode dot net Reported By: jrod at blacknode dot net -Status: Feedback +Status: Closed Bug Type: Session related Operating System: Linux PHP Version: 5.2.5 New Comment: Thank you for that, umask(0) remedied the issue. Regards! Previous Comments: ------------------------------------------------------------------------ [2008-02-10 14:34:08] iliaa@php.net Works fine in CVS, what is your umask set to? Have you tried doing umask(0) before session_start() ? ------------------------------------------------------------------------ [2008-02-09 21:37:14] jrod at blacknode dot net Bump ------------------------------------------------------------------------ [2008-02-08 23:21:05] jrod at blacknode dot net 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 this bug report at http://bugs.php.net/?id=44079&edit=1

« previous php.bugs (#122203) next »