php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #52067 chdir to a nonexisting directory when chrooting is buggy
Submitted: 2010-06-12 19:49 UTC Modified: 2010-06-13 12:32 UTC
From: fat@php.net Assigned: fat (profile)
Status: Closed Package: FPM related
PHP Version: 5.3SVN-2010-06-12 (SVN) 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: fat@php.net
New email:
PHP Version: OS:

 

 [2010-06-12 19:49 UTC] fat@php.net
Description:
------------
when setting chroot and chdir to a non existing directory into the chroot. FPM 
loops creating children which are dying because they can't chdir.


Jun 12 19:46:10.884803 [NOTICE] [pool www] child 27114 started
Jun 12 19:46:10.884930 [WARNING] [pool www] child 27114 exited with code 255 
after 0.000149 seconds from start
Jun 12 19:46:10.885001 [WARNING] [pool www] child 27114 said into stderr: "Jun 
12 19:46:10.884025 [ERROR] [pool www] chdir(/usr/local/nginx/html) failed: No 
such file or directory (2)"
Jun 12 19:46:10.885072 [WARNING] [pool www] child 27114 said into stderr: "Jun 
12 19:46:10.884153 [ERROR] [pool www] child failed to initialize", pipe is 
closed
Jun 12 19:46:10.886642 [NOTICE] [pool www] child 27115 started
Jun 12 19:46:10.886768 [WARNING] [pool www] child 27115 exited with code 255 
after 0.000149 seconds from start
Jun 12 19:46:10.886842 [WARNING] [pool www] child 27115 said into stderr: "Jun 
12 19:46:10.885852 [ERROR] [pool www] chdir(/usr/local/nginx/html) failed: No 
such file or directory (2)"
Jun 12 19:46:10.886914 [WARNING] [pool www] child 27115 said into stderr: "Jun 
12 19:46:10.885982 [ERROR] [pool www] child failed to initialize", pipe is 
closed
Jun 12 19:46:10.888469 [NOTICE] [pool www] child 27116 started
Jun 12 19:46:10.888596 [WARNING] [pool www] child 27116 exited with code 255 
after 0.000150 seconds from start
Jun 12 19:46:10.888671 [WARNING] [pool www] child 27116 said into stderr: "Jun 
12 19:46:10.887691 [ERROR] [pool www] chdir(/usr/local/nginx/html) failed: No 
such file or directory (2)"
Jun 12 19:46:10.888744 [WARNING] [pool www] child 27116 said into stderr: "Jun 
12 19:46:10.887820 [ERROR] [pool www] child failed to initialize", pipe is 
closed
Jun 12 19:46:10.890295 [NOTICE] [pool www] child 27117 started
Jun 12 19:46:10.890422 [WARNING] [pool www] child 27117 exited with code 255 
after 0.000150 seconds from start
Jun 12 19:46:10.890491 [WARNING] [pool www] child 27117 said into stderr: "Jun 
12 19:46:10.889524 [ERROR] [pool www] chdir(/usr/local/nginx/html) failed: No 
such file or directory (2)"
Jun 12 19:46:10.890563 [WARNING] [pool www] child 27117 said into stderr: "Jun 
12 19:46:10.889651 [ERROR] [pool www] child failed to initialize", pipe is 
closed
Jun 12 19:46:10.893124 [NOTICE] [pool www] child 27119 started
Jun 12 19:46:10.893256 [WARNING] [pool www] child 27119 exited with code 255 
after 0.000155 seconds from start
Jun 12 19:46:10.893329 [WARNING] [pool www] child 27119 said into stderr: "Jun 
12 19:46:10.892335 [ERROR] [pool www] chdir(/usr/local/nginx/html) failed: No 
such file or directory (2)"
Jun 12 19:46:10.893401 [WARNING] [pool www] child 27119 said into stderr: "Jun 
12 19:46:10.892467 [ERROR] [pool www] child failed to initialize", pipe is 
closed


Test script:
---------------
chroot=/usr/local/nginx/html
chdir=/usr/local/nginx/html


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-06-12 19:50 UTC] fat@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: fat
 [2010-06-13 12:30 UTC] fat@php.net
Automatic comment from SVN on behalf of fat
Revision: http://svn.php.net/viewvc/?view=revision&revision=300418
Log: Fix #52067, chroot and chdir path were not checked at startup. If configured with unexistant directories, FPM entered in an error loop.
 [2010-06-13 12:32 UTC] fat@php.net
-Status: Assigned +Status: Closed
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC