[issue10608] [doc] Add a section to Windows FAQ explaining os.symlink

Eryk Sun report at bugs.python.org
Wed Dec 8 16:02:12 EST 2021


Eryk Sun <eryksun at gmail.com> added the comment:

Ingrid's patch misses the requirement to log off after adding a privilege to the current account. A new access token is required, from a fresh logon. 

Privileges can also be added to groups, not just to individual user accounts. Thus the symlink privilege can be granted to a standard group or well-known group, such as "Users" or "Authenticated Users".

Python 3.8+ supports the system's developer mode, which allows unprivileged symlink creation. This is just for developer tools, such as Git. Developer mode should not be relied on for regular scripts and applications. 

In POSIX, symlinks are widely used to reduce the burden of software maintenance. In Windows, however, symlinks are not reliably available, due to limited file system support (primarily NTFS, ReFs) and the requirement for a privilege that standard users lack by default. Another significant problem in Windows is the behavior of the shell API (shell32.dll), which eagerly resolves a symlink to its target and thus breaks many use cases for symlinks (e.g. virtual environments). Given these problems, using symlinks may actually increase the maintenance burden in Windows. Applications have to support a fallback path for Windows -- such as hard linking, copying, or launchers -- when symlinks either aren't available or for use cases that are unreliable (e.g. due to the way symlinks are accessed in the GUI shell).

----------
nosy: +eryksun

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue10608>
_______________________________________


More information about the Python-bugs-list mailing list