|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2021-06-21 11:27 UTC] cmb@php.net
-Status: Open
+Status: Verified
-Assigned To:
+Assigned To: cmb
[2021-06-21 12:41 UTC] cmb@php.net
-Type: Bug
+Type: Documentation Problem
[2021-06-21 12:41 UTC] cmb@php.net
[2021-06-21 13:00 UTC] git@php.net
[2021-06-21 13:00 UTC] git@php.net
-Status: Verified
+Status: Closed
[2021-06-21 18:25 UTC] git@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 08:00:02 2025 UTC |
Description: ------------ This bug can be reproduced by creating a directory called test in the root of drive C:, add an text file in the directory named "test.txt", give the IUSR user read but not write access to the file. IUSR is the user account php uses on IIS 10 when running php-scripts. Then runthe following php-code: echo substr(sprintf('%o', fileperms('C:\test\test.txt')), -4); It will show "0666" even thou the current user does not have write permission to the file. If it's helpful, is_writable('C:\test\test.txt') does correctly return false. Test script: --------------- I did not write this code, i found it on php.net. But it works fine to reproduce the bug(please read description): echo substr(sprintf('%o', fileperms('C:\test\test.txt')), -4); Expected result: ---------------- I expected to see "0644". Actual result: -------------- Actual result was "0666".