|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42944 FAILing "Test fileperms(), chmod() functions: error conditions"
Submitted: 2007-10-12 11:24 UTC Modified: 2007-10-21 15:41 UTC
Avg. Score:1.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: jiri dot hruska at fud dot cz Assigned:
Status: Closed Package: Filesystem function related
PHP Version: 5.2.4 OS: SunOS 5.8
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.
Block user comment
Status: Assign to:
Bug Type:
From: jiri dot hruska at fud dot cz
New email:
PHP Version: OS:


 [2007-10-12 11:24 UTC] jiri dot hruska at fud dot cz
The test "Test fileperms(), chmod() functions: error conditions" [ext/standard/tests/file/006_error.phpt] fails, although the tested functionality is fine.

Reproduce code:
There is
>> printf("%o", fileperms("/etc/passwd") );'
in the --FILE-- section and
>> 100644
as the expected output in the --EXPECTF-- section.

I found that on the Solaris server where I compiled PHP, /etc/passwd has permissions set to 100444 instead of 100644 which the test awaits. It is a bit weird, but the test result should not depend on this, so something like 'fileperms() & 077' would be wise.

Expected result:
The test should pass.

Actual result:
The test fails.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-10-21 15:41 UTC]
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
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Wed Feb 08 00:05:48 2023 UTC