Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > de.comp.lang.python > #5763

os.symlink unter Windows?

From Ulli Horlacher <framstag@rus.uni-stuttgart.de>
Newsgroups de.comp.lang.python
Subject os.symlink unter Windows?
Date 2021-11-16 19:04 +0000
Organization University of Stuttgart, FRG
Message-ID <sn0vbb$ul6$1@news2.informatik.uni-stuttgart.de> (permalink)

Show all headers | View raw


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: horlacher@tik.uni-stuttgart.de
Allmandring 30a                Tel:    ++49-711-68565868
70569 Stuttgart (Germany)      WWW:    http://www.tik.uni-stuttgart.de/

Back to de.comp.lang.python | Previous | NextNext in thread | Find similar


Thread

os.symlink unter Windows? Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2021-11-16 19:04 +0000
  Re: os.symlink unter Windows? Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2021-11-17 13:57 +0000

csiph-web