Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

os.symlink unter Windows?

84 views
Skip to first unread message

Ulli Horlacher

unread,
Nov 16, 2021, 2:04:12 PM11/16/21
to
Unter Linux laeuft mein Programm, unter Windows bekomme ich:

Traceback (most recent call last):
File "P:\fextasy.py", line 631, in <module>
main()
File "P:\fextasy.py", line 96, in main
if not path.exists(fddir): symlink(ddir,fddir)
OSError: [WinError 1314] A required privilege is not held by the client: 'C:\\Users\\admin\\Downloads\\fex' -> 'C:\\Users\\admin\\fex\\Downloads'


Ich hab weiter oben gesetzt:

from os import symlink


Auf https://docs.python.org/3/library/os.html steht:

On newer versions of Windows 10, unprivileged accounts can create symlinks
if Developer Mode is enabled. When Developer Mode is not
available/enabled, the SeCreateSymbolicLinkPrivilege privilege is
required, or the process must be run as an administrator.
OSError is raised when the function is called by an unprivileged user.

Das duerfte das Problem sein :-}

Meine User haben aber kein SeCreateSymbolicLinkPrivilege und bekommen das
auch nicht.

Gibt es da irgendeinen Workaround?


--
Ullrich Horlacher Server und Virtualisierung
Rechenzentrum TIK
Universitaet Stuttgart E-Mail: horl...@tik.uni-stuttgart.de
Allmandring 30a Tel: ++49-711-68565868
70569 Stuttgart (Germany) WWW: http://www.tik.uni-stuttgart.de/

Ulli Horlacher

unread,
Nov 17, 2021, 8:57:17 AM11/17/21
to
Stefan Ram <r...@zedat.fu-berlin.de> wrote:
> Ulli Horlacher <fram...@rus.uni-stuttgart.de> writes:
> >Subject: os.symlink unter Windows?
>
> Auf comp.lang.python wird mir als neuestes Posting gerade angezeigt:
>
> ast: Symbolic links on Windows

Gibts bei mir nicht.


> ("ast" = Name des Autors/Absenders). Interessanter Zufall!

Was ist daran interessant?
0 new messages