php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37191 chmod takes off sticky bit from directory
Submitted: 2006-04-25 07:01 UTC Modified: 2006-04-25 08:41 UTC
From: jarek at sztejn dot net Assigned:
Status: Closed Package: *Directory/Filesystem functions
PHP Version: 5.1.2 OS: 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: jarek at sztejn dot net
New email:
PHP Version: OS:

 

 [2006-04-25 07:01 UTC] jarek at sztejn dot net
Description:
------------
When safe_mode is enabled function chmod takes off sticky bit from directory. It should ignore sticky bit, but it changes. Function mkdir does ok, creates directory and takes SGID from parent directory but chmod removes SGID from this new directory in safe_mode enabled. Is there any solution to change directory permission without changing sticky bit when safe_mode enabled?
Parent directory permission:
drwxrwsrwx   3 12123 9549 4096 2006-04-25 08:34 .
mkdir('./directory',02775);
Subdirectory after mkdir:
drwxrwsr-x   2 www   9549 4096 2006-04-25 08:56
chmod('./directory',02777);
Subdirectory after chmod:
drwxrwxrwx   2 www   9549 4096 2006-04-25 08:57 directory



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-04-25 08:41 UTC] tony2001@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 21:01:36 2024 UTC