This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: winln for native symlinks

Greetings, Corinna Vinschen!

>> > It shows this error message:
>> > winln: you don't permission to create symbolic links. Run, as
>> > administrator,
>> > winln:   editrights -a SeCreateSymbolicLinkPrivilege -a $YOUR_USER
>> > which should be fixed somehow like this:
>> > You don't have permission to create symbolic links. Run, as administrator,
>> >         editrights -a SeCreateSymbolicLinkPrivilege -u $USER
>> > Moreover, this advice does not help. Even after having issued this
>> > command as administrator, winln -s still works as administrator only.
>> The SeCreateSymbolicLinkPrivilege privilege is filtered by User Account
>> Control (UAC).  If your account is a member of the "Administrators"
>> group, then the process needs to be run with your elevated credentials
>> in order to make use of the SeCreateSymbolicLinkPrivilege privilege.
>> The "Administrator" account always runs in an elevated state and
>> accounts that are not members of the "Administrators" group do not have
>> their security tokens filtered by UAC.
>> Does Cygwin permit binaries to be built with manifests?  If so,
>> winln.exe could include an embedded manifest that indicates that
>> elevated status is required.  The user would then be prompted by UAC
>> whenever the command is used.

> That doesn't work.  You have to run in an elevated console or an
> elevated mintty.  Cygwin uses CreateProcess to start child processes and
> there's no way to make CreateProcess start the UAC confirmation process.
> Only ShellExecute{Ex} can do that.

However, this could be worked around through a recursive call to the program
with the same parameters it was invoked in case of errors, that may have been
caused by UAC. Not the best solution, however, and not always appropriate, I
admit (i.e. invoking UAC prompt in remote terminal session would be a bad idea).
Though... on the other hand, guys from Far group managed to wrap UAC prompt in
the Far manager, if I understand it right. (I don't have Vista/Win7 to fully
test the mechanics, unfortunately.)

Andrey Repin ( 05.04.2013, <01:32>

Sorry for my terrible english...

Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]