|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2020-07-05 03:14 UTC] requinix@php.net
-Summary: Windows SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE
+Summary: Support SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE
-Type: Bug
+Type: Feature/Change Request
[2020-07-06 08:08 UTC] cmb@php.net
-PHP Version: 7.4.7
+PHP Version: Next Minor Version
[2020-07-20 13:01 UTC] cmb@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 18:00:01 2025 UTC |
Description: ------------ Windows SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE Using this file: <?php symlink('a.php', 'b.php'); I get this result: PS C:\php> php a.php Warning: symlink(): Permission denied in C:\php\a.php on line 2 I am not running as admin, but I do have developer mode enabled: <https://howtogeek.com/292914/what-is-developer-mode-in-windows-10> Since December 2016, admin rights are not required to create a symlink, as long as the application uses the flag `SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE`: <https://blogs.windows.com/windowsdeveloper/2016/12/02/symlinks-windows-10> Note that other programming languages are already doing this. For example Python: <https://github.com/python/cpython/blob/1f764531/Modules/winreparse.h#L50> Dart: <https://github.com/dart-lang/sdk/blob/a677c245/runtime/bin/file_win.cc#L430> Go: <https://github.com/golang/go/blob/dd150176/src/internal/syscall/windows/symlink_windows.go#L13> Nim: <https://github.com/nim-lang/Nim/blob/af27e6bd/lib/pure/os.nim#L2417-L2419>