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: Using native symlinks


On 29 May 2013 04:39, Corinna Vinschen wrote:
> On May 28 22:23, Chris Sutcliffe wrote:
>> It works fine if I create the native symlinks in an elevated shell,
>> but does not if I create the native symlinks in a "normal" shell.  Is
>> this expected (i.e. does creating native symlinks only work in
>> elevated shells?).
>
> Welcome to the wonderful world of native NTFS symlinks!!1!11!!
>
> It's true and it works like this: Have a look into the "Local Security
> Policy" MMC Snap-in.  In the left hand tree view navigate to
> "Security Settings" -> "Local Policies" -> "User Rights Assignments".
> On the right side look for "Create symbolic links".  You will see that
> by default only members of the Administrators group are allowed to
> create symlinks.
>
> If you're running under an admin account in a non-elevated shell, your
> token has been stripped by all Admin-only user rights, so you also have
> no right to create symlinks.
>
> To workaround that, you can either add yourself to the "Create symbolic
> links" right, or you can add the "Users" group if you want to allow
> every user to create symlinks.  But this requires changing it on all
> machines manually, so alternatively you can create a domain policy which
> adds the trusted users to this user right on all machines.

I tried this approach and I'm still not having any luck with the user
being able to create native symbolic links in a non-elevated shell.
As a work around I've created a 'sudo' alias:

alias sudo='cygstart --action=runas'

which works nicely as I can launch commands elevated from a
non-elevated shell.  For running commands like winln / ln I can add
the "--hidden" option (i.e. sudo --hidden) and no cmd window will
pop-up during the execution of the command.

I figured I would pass this along in case someone else finds this useful.

Chris

--
Chris Sutcliffe
http://emergedesktop.org
http://www.google.com/profiles/ir0nh34d

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


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