php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21512 mkdir() does not work in safe mode
Submitted: 2003-01-08 02:32 UTC Modified: 2003-01-08 02:44 UTC
From: lazybabies at yahoo dot com Assigned:
Status: Not a bug Package: Performance problem
PHP Version: 4.2.3 OS: Rehat 8.0
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: lazybabies at yahoo dot com
New email:
PHP Version: OS:

 

 [2003-01-08 02:32 UTC] lazybabies at yahoo dot com
compiled into php:
./configure  --with-apxs=/usr/local/apache/bin/apxs --with-pgsql=/usr/local/pgsql/ --with-mcrypt=/usr/local --with-xml  --with-pdflib --disable-debug

using the following directives in my httpd.conf:
php_admin_value safe_mode 1
php_admin_value safe_mode_exec_dir /usr/local/src/demo/

this expression never evaluates to true:
if(!mkdir($new_dir, 0755)) {
 $error = "The directory could not be created.";
}

the var $new_dir is always a subdirectory of a directory with umask=000 and mod=777 and ownership=nobody.nobody. The class running the code is owned by nobody.nobody. Nobody owns the apache server (v.1.3.27) processes.

If safe_mode is set to false, the mkdir() function works just fine.

Mkdir() + safe mode works just fine under php 4.3 also running under redhat 8.0, with the same compile options, the same httpd.conf directives, the same apache version, and the same directory permissions...aaack!

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-01-08 02:44 UTC] lazybabies at yahoo dot com
(changed my email address)
 [2003-01-08 02:44 UTC] sesser@php.net
It works in 4.3 so obviously it was fixed.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 20:01:32 2024 UTC