php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11383 PHP fails to honor g+s on dir
Submitted: 2001-06-10 09:52 UTC Modified: 2001-06-10 18:36 UTC
From: johnston at megaepic dot com Assigned:
Status: Closed Package: Filesystem function related
PHP Version: 4.0.4pl1 OS: Debian GNU/Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: johnston at megaepic dot com
New email:
PHP Version: OS:

 

 [2001-06-10 09:52 UTC] johnston at megaepic dot com
For example...
mkdir directory
chown www-data.group directory/
chmod g+s directory/

then fopen, fwrite, close, etc.

The new file is owned www-data.group, not www-data

If I su to www-data in a shell, and do
> newFile

the newfile is created www-data.group like it's supposed to.

I've tried chgrp'ing the file after creation to the group, 'group' but get operation not permitted.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-10 14:01 UTC] sniper@php.net
Not a PHP problem. Set your apache conf right
and it should work. all files are created and have
the same permissions as the webserver.

--Jani

 [2001-06-10 18:36 UTC] johnston at megaepic dot com
Apache is running www-data.www-data. Why is this Apache's problem? What conf directive would enable this? I know that new files are created as the user which apache's running as, but does PHP not implement it's own functions? Wouldn't this be apache's fault only if PHP passed all file creation functions over to Apache? Does it?
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 29 10:01:30 2024 UTC