|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2008-07-08 17:11 UTC] carsten_sttgt at gmx dot de
  [2009-05-17 19:54 UTC] pajoye@php.net
 | |||||||||||||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 11:00:01 2025 UTC | 
Description: ------------ NT ACL Permissions can be modified in Windows by right clicking on the file, going to properties, and security. Clicking the Everyone user and hitting Deny Read, will prevent ANYTHING from reading, even if they have READ permissions granted elsewhere. is_readable() doesn't seem to care and thinks that all these files are readable, when in fact they aren't. is_writeable() probably has the same problem. Previous Bugs Identified with this have been closed: 41519. Reproduce code: --------------- $some_file = 'C:\\path\to\file.txt'; if(is_readable($some_file)) { echo file_get_contents($some_file); } else { echo "This file isn't readable"; } Expected result: ---------------- With NTFS ACL Permissions set to allow reading: *Contents of File* With NTFS ACL Permissions set to disallow reading: "This file isn't readable"; Actual result: -------------- With NTFS ACL Permissions set to allow reading: *Contents of File* With NTFS ACL Permissions set to disallow reading: Warning: file_get_contents(C:\\path\to\file.txt) [function.file-get-contents]: failed to open stream: Permission denied in C:\\path\to\script.php on line 4