-
Notifications
You must be signed in to change notification settings - Fork 338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A required privilege is not held by the client #594
Comments
Here's an example of hardlinking without admin privileges on Windows. import ctypes
from ctypes.wintypes import BOOL
CreateHardLink = ctypes.windll.kernel32.CreateHardLinkW
CreateHardLink.restype = BOOL
CreateHardLink.argtypes = [
ctypes.c_wchar_p,
ctypes.c_wchar_p,
ctypes.c_void_p
]
source = "thisfile.txt"
with open(source, "w") as f:
f.write("")
destination = "thisfile_hard.txt"
if not CreateHardLink(destination, source, None):
raise ctypes.WinError() Having said that, hardlinking .exe's like this is unlikely to work anyway, because the .exe will assume the parent directory to be its current working directory, and won't find dynamic libraries relative to it. Python for example wouldn't work this way still, which is a little unfortunate. Most likely, symlinking of any kind won't work on Windows. |
try to enable |
On Windows, as a non-administrator, running
rez-bind --quickstart
yields the following stack trace.Related
Presumably, because users on Windows can't (soft) symlink files without administrative privileges.
hardlink
rather thansoftlink
which does work without admin privs, but doesn't work across mounts, e.g. fromC:\source.txt
toD:\dest.txt
.Temporary Workaround
Here's how I got over this initial hurdle.
~/
directory won't point to your user anymore, sorez-bind --quickstart
won't actually help install anything there.Now the user has symlink privileges, and will write into the proper directory. However, this still won't work.
Both the
python
andpip
symlinks are broke, because soft symlinks are terrible. So you can:c:\python27
into~/packages/python/.../bin
, overwriting the soft symlink with a hard copy.pip
symlink with a.bat
file like the one below.pip.bat
And presto, it works.
In retrospect, I'd probably build and release Python and Pip manually, rather than have
--quickstart
do it for me. But getting--quickstart
to do it shouldn't be an issue if soft symlinks was either replaced with a hard symlink or a plain copy.The text was updated successfully, but these errors were encountered: