|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-05-03 02:17 UTC] ben at skiddle dot com
[2005-05-03 02:20 UTC] ben at skiddle dot com
[2005-05-06 12:34 UTC] ben at skiddle dot com
[2005-05-06 13:39 UTC] tony2001@php.net
[2005-05-06 13:51 UTC] ben at skiddle dot com
[2005-05-06 14:58 UTC] tony2001@php.net
[2005-05-06 15:17 UTC] ben at skiddle dot com
[2005-05-08 04:36 UTC] sniper@php.net
[2005-05-16 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 01 18:00:01 2025 UTC |
Description: ------------ I am running PHP as a CGI module with Apache 2.0.52 Apache runs as user 'apache' PHP cgi runs as vhost user 'myuser' (for example) Both users are in groupa I have the following folder: drwxr-wr-w articles myuser groupa When I create a new file in this folder, it is being given permissions rw------- mynewfile.shtml myuser groupa Because of this apache cannot read the file. This file should inherit the parent folders permissions? I am using simple fopen, fwrite, fclose This is either a problem with inheriting permissions, or the system umask has been altered. This has only happened since upgrading from 4.3.10 to 4.3.11 and has broken several script, some using move_uploaded_file also. Reproduce code: --------------- if (!$handle = fopen($longfilename, 'w')) { print "<BR>Cannot open file ($filename)"; return false; } // Write $somecontent to our opened file. if (!@fwrite($handle, $somecontent)) { print "<BR>Cannot write to file ($filename)"; return false; } fclose($handle); Expected result: ---------------- File created with same permissions as parent folder. (no umask or chmod settings are applied in the php code, or have been altered anywhere) Actual result: -------------- File created with less permissions