|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2019-09-27 00:51 UTC] requinix@php.net
-Status: Open
+Status: Not a bug
[2019-09-27 00:51 UTC] requinix@php.net
[2019-09-27 02:09 UTC] marcelotpcruz at gmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 01:00:02 2025 UTC |
Description: ------------ If I create a file manually, named as 'v.', php can read and write it, but can't create or delete. I'm using php -a(Interactive shell). I tested on my server with windows 7 as well with the same results. I also tested on cmd with admin rights as well as nt authority\system(checked with whoami). Test script: --------------- php -a fopen('v.', 'c+');//Does not work file_put_contents('v.', 'dsdsd');//Does not work fopen('v.v', 'c+');//works //Manually create a file .v with ddswd as content echo file_get_contents('v.');//returns ddswd file_put_contents('v.', 'kkk');//works echo file_get_contents('v.');//returns kkk unlink('v.');//Permission denied in php shell code on line 1 unlink('v.v');//works //Delete the file manually than touch touch('v.');//touch(): Unable to create file v. because Permission denied in php shell code on line 1 touch('v');//works Expected result: ---------------- File is created successfully, since I can create it from prompt and notepad++ without error. Actual result: -------------- PHP Warning: fopen(v.): failed to open stream: Permission denied in php shell code on line 1