Hello list,

at the moment I'm having a problem with most filesystem functions (because they are using tsrm_realpath_r internally) and a special situation.

Steps to reproduce:
| md test1
| mklink /j test test1
| icacls test /deny *S-1-1-0:(rd)

at this point I can't create/write to a file in test:
| php -r "file_put_contents('test/test.txt', 'test');"
|
| Warning: file_put_contents(test\test.txt): failed to open stream:
| No such file or directory in Command line code on line 1
even this should be possible.

Also I can't use realpath in this dir (You remember this Pierre? ;-) ):
| cd test
| php -r "var_dump(realpath('.'));"
| bool(false)
even this should also be possible. BTW: getcwd() is working in this dir.


Well, if I change tsrm_realpath_r in tsrm_virtual_cwd.c (line ~863 / php5.3.5) from:
| hLink = CreateFile(path, GENERIC_READ, ...
to
| hLink = CreateFile(path, 0, ...
it's working as expected. But maybe there is another good reason to use GENERIC_READ at this point...

Regards,
Carsten



--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to