xref: /PHP-5.4/ext/session/tests/bug42596.phpt (revision 68068512)
1--TEST--
2Bug #42596 (session.save_path MODE option will not set "write" bit for group or world)
3--SKIPIF--
4<?php
5	if(substr(PHP_OS, 0, 3) == "WIN") die("skip not for Windows");
6	include('skipif.inc');
7?>
8--INI--
9session.use_cookies=0
10session.cache_limiter=
11session.use_trans_sid=1
12arg_separator.output="&amp;"
13session.name=PHPSESSID
14session.serialize_handler=php
15session.save_handler=files
16--FILE--
17<?php
18$sessdir = dirname(__FILE__).'/sessions/';
19@rmdir($sessdir);
20mkdir($sessdir);
21$save_path = '0;0777;'.$sessdir;
22umask(0);
23session_save_path($save_path);
24session_start();
25echo "hello world\n";
26session_write_close();
27
28foreach (glob($sessdir. "*") as $sessfile) {
29  var_dump(decoct(fileperms($sessfile)));
30  unlink($sessfile);
31}
32rmdir($sessdir);
33--EXPECT--
34hello world
35string(6) "100777"
36
37