NTFS Symlinks (reparse point) redux

View: New views
8 Messages — Rating Filter:   Alert me  

NTFS Symlinks (reparse point) redux

by Linda Walsh :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Sorry to bring up and older topic, but I'm only beginning to explore Vista
and run into some of its cra^h^h^hnew features.

Corinna Vinschen wrote:

> On Oct 29 02:40, Larry Hall (Cygwin) wrote:
>> On 10/29/2009 01:26 AM, Neil Mowbray wrote:
>>> On NTFS systems that support real symbolic links (eg those with Vista)
>>> Will ln -s be chansed to support native symbolic links?

>> No, not until, at least, native symbolic links don't require elevated
>> privileges to  use.
-----
   They don't have to..."sorta": Under the User-rights assignment plugin,
where you assign what users/groups have what priviledges, you can 'allow'
USERS, or ALL ATHENTICATED USERS to have the priviledge.  Then it doesn't
require them to be an Administrator to use. They might still get a "press
ok to continue" prompt if they have UAC turned on (though I'm not sure how
many end-users would want to leave that on by default), but if you have UAC
turned off, then even if you run as a regular user (in group Users), you'd
still have that privilege.    

> And even then, no.  We need symlinks which support POSIX style content.
---
   Why?  Can't cygwin convert it? Not that I'm necessarily pushing for this
-- they are different from the normal cygwin conception of symlinks.

> So there are two problems: - Only users with administrator permissions
> can create native symlinks.

---
   Can be worked around.

> - Due to the way they are used in the Win32 API, there's no way to use
> them with POSIX paths *and* Win32 paths for interoperability.  So why
> bother?
---
   Well -- because it would be _nice_ to have symlinks created in cygwin,
also be recognized and usable when one looks at the same links in explorer.


>>> Also rm<link>  removes the target of the symbolic link not the link
>>> file.  Is this what you want?

>> I cannot reproduce this behavior using Cygwin 1.7
>> <http://cygwin.com/#beta-test> on Windows 7.

> Yes, indeed.  Cygwin 1.5 doesn't recognize native symlinks and
> consequentially the unlink() function didn't use the
> FILE_OPEN_REPARSE_POINT flag to open the file for deletion.

    Does this mean utils like 'file' or 'tar' or 'cp' will correctly detect
it as a symlink as well?



--
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


Re: NTFS Symlinks (reparse point) redux

by Christopher Faylor-8 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Nov 05, 2009 at 02:55:29PM -0800, Linda Walsh wrote:

>Sorry to bring up and older topic, but I'm only beginning to explore Vista
>and run into some of its cra^h^h^hnew features.
>
>Corinna Vinschen wrote:
>
>> On Oct 29 02:40, Larry Hall (Cygwin) wrote:
>>> On 10/29/2009 01:26 AM, Neil Mowbray wrote:
>>>> On NTFS systems that support real symbolic links (eg those with Vista)
>>>> Will ln -s be chansed to support native symbolic links?
>
>>> No, not until, at least, native symbolic links don't require elevated
>>> privileges to  use.
>-----
>They don't have to..."sorta": Under the User-rights assignment plugin,
>where you assign what users/groups have what priviledges, you can
>'allow' USERS, or ALL ATHENTICATED USERS to have the priviledge.  Then
>it doesn't require them to be an Administrator to use.

No one said "Administrator".  Corinna said "elevated privileges".  You
can't expect that anyone who wants to use a symlink will be capable of
getting additional rights.

cgf

--
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


Re: NTFS Symlinks (reparse point) redux

by Linda Walsh :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Christopher Faylor wrote:

>>>>> Will ln -s be chansed to support native symbolic links?
>>>> No, not until, at least, native symbolic links don't require elevated
>>>> privileges to  use.
>> -----
>> They don't have to..."sorta": Under the User-rights assignment plugin,
>> where you assign what users/groups have what priviledges, you can
>> 'allow' USERS, or ALL ATHENTICATED USERS to have the priviledge.  Then
>> it doesn't require them to be an Administrator to use.
>
> No one said "Administrator".  Corinna said "elevated privileges".  You
> can't expect that anyone who wants to use a symlink will be capable of
> getting additional rights.
---
        That's why I said "sorta"...if a user is on their own system,
or if an administrator ok's it, they could set up their system to
allow "symlinks" for normal users.  

        I mean it is a normal, non-privileged function in linux,
it might become that in the NT world -- its just that now no one
is used to it, and to many tools, the 'symlinks' look like regular
files or directories -- i.e. the are 'hard' to see.  It's only been
on Vista that I now see the reparse points I was already using in
XP, now showing up with the little arrow (symlink symbol).  

        If people get used to symlinks being around as they are
on unix, then such a 'privilege' might become a common place
configuration -- thus my desire to see cygwin be able to at least
recognize and treat them as symlinks (first and foremost), with
'creating' them left open for some future possibility if they
become more prevalent.  I can easily live with linkd/delrp, myself
at this point, but I would really appreciate visual aids in recognizing them and where they link to -- like an "ls -l" of a dir showing me the
path of such a symlink -- EVEN if it was a Winpath.  That'd be
an "instant" clue that it was a reparse-symlink and not a conventional
cygwin ".lnk" symlink....

        Is that more 'palatable' with that suggestion? :-)

*baking to please...*
-linda


--
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


Re: NTFS Symlinks (reparse point) redux

by Christopher Faylor-8 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Nov 05, 2009 at 07:04:09PM -0800, Linda Walsh wrote:

>Christopher Faylor wrote:
>>>>>> Will ln -s be chansed to support native symbolic links?
>>>>> No, not until, at least, native symbolic links don't require elevated
>>>>> privileges to  use.
>>> -----
>>> They don't have to..."sorta": Under the User-rights assignment plugin,
>>> where you assign what users/groups have what priviledges, you can
>>> 'allow' USERS, or ALL ATHENTICATED USERS to have the priviledge.  Then
>>> it doesn't require them to be an Administrator to use.
>>
>> No one said "Administrator".  Corinna said "elevated privileges".  You
>> can't expect that anyone who wants to use a symlink will be capable of
>> getting additional rights.
>
>That's why I said "sorta"...if a user is on their own system, or if an
>administrator ok's it, they could set up their system to allow
>"symlinks" for normal users.
>
>I mean it is a normal, non-privileged function in linux, it might
>become that in the NT world -- its just that now no one is used to it,
>and to many tools, the 'symlinks' look like regular files or
>directories -- i.e.  the are 'hard' to see.  It's only been on Vista
>that I now see the reparse points I was already using in XP, now
>showing up with the little arrow (symlink symbol).

You're talking about doing a lot of work for something that now requires
the user to do something special but "might become that in the NT
world".  And, there's still the issue of symlinks not handling POSIX
paths.  How would you handle a symlink to a device or to something in
/proc?  What do you do when an MS-DOS path symlink points to a mount
point and the mount point changes?

cgf

--
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


Re: NTFS Symlinks (reparse point) redux

by Larry Hall (Cygwin) :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 11/05/2009 10:04 PM, Linda Walsh wrote:
>      If people get used to symlinks being around as they are
> on unix, then such a 'privilege' might become a common place
> configuration -- thus my desire to see cygwin be able to at least
> recognize and treat them as symlinks (first and foremost), with
> 'creating' them left open for some future possibility if they
> become more prevalent.

If someday there's actually good support for something that can be used
in Windows as symlinks are in Linux/Unix, I expect there will be lots of
interest in getting them fully supported in Cygwin.  We're not there yet.

> I can easily live with linkd/delrp, myself
> at this point, but I would really appreciate visual aids in recognizing
> them and where they link to -- like an "ls -l" of a dir showing me the
> path of such a symlink -- EVEN if it was a Winpath.  That'd be
> an "instant" clue that it was a reparse-symlink and not a conventional
> cygwin ".lnk" symlink....
>
>      Is that more 'palatable' with that suggestion?

Let's see.  So you'd like Cygwin to make changes to recognize reparse
points, even though there'd be no way to manipulate them and would not
point to a POSIX path.  That seems like allot of extra complication to the
already complicated and slow path handling code to support a questionable
Windows feature that many people won't be able to use in Windows.  And,
of course, if we were to do as you suggest, we'd then get questions about
how to *make* one of those, why it can't be done, and how come they don't
contain POSIX paths too.  Hm, I'm having trouble seeing the real benefit here
to the Cygwin community.  That said, I (and I expect others) would *love* for
Windows to have *real* symlinks without all these hokey restrictions. MS has
been taking swings at this for years now and, in my view, keeps failing to
connect.  I think we have to fight the temptation to see reparse points as
something that they're not.

--
Larry Hall                              http://www.rfk.com
RFK Partners, Inc.                      (508) 893-9779 - RFK Office
216 Dalton Rd.                          (508) 893-9889 - FAX
Holliston, MA 01746

_____________________________________________________________________

A: Yes.
 > Q: Are you sure?
 >> A: Because it reverses the logical flow of conversation.
 >>> Q: Why is top posting annoying in email?

--
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


Re: NTFS Symlinks (reparse point) redux

by Corinna Vinschen-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Nov  5 22:39, Larry Hall (Cygwin) wrote:

> On 11/05/2009 10:04 PM, Linda Walsh wrote:
> >     If people get used to symlinks being around as they are
> >on unix, then such a 'privilege' might become a common place
> >configuration -- thus my desire to see cygwin be able to at least
> >recognize and treat them as symlinks (first and foremost), with
> >'creating' them left open for some future possibility if they
> >become more prevalent.
>
> If someday there's actually good support for something that can be used
> in Windows as symlinks are in Linux/Unix, I expect there will be lots of
> interest in getting them fully supported in Cygwin.  We're not there yet.
>
> >I can easily live with linkd/delrp, myself
> >at this point, but I would really appreciate visual aids in recognizing
> >them and where they link to -- like an "ls -l" of a dir showing me the
> >path of such a symlink -- EVEN if it was a Winpath.  That'd be
> >an "instant" clue that it was a reparse-symlink and not a conventional
> >cygwin ".lnk" symlink....
> >
> >     Is that more 'palatable' with that suggestion?
>
> Let's see.  So you'd like Cygwin to make changes to recognize reparse
> points, even though there'd be no way to manipulate them and would not
> point to a POSIX path.  That seems like allot of extra complication to the
> already complicated and slow path handling code to support a questionable

Er... Larry?  Cygwin 1.7 does recognize reparse points and especially
the new NTFS6 symlinks.  However, it only reads them, never writes them,
for the reasons repeated by cgf and me a couple of times.  You just
can't use them to store POSIX paths *and* allowing interoperability with
native Win32 processes, plus the nonsense of coupling them with a user
right, plus the super-nonsense only to allow Admins to create them by
default.  All that together makes them worse than Windows shortcuts and
they have not the faintest advantage over Cygwin-only symlinks
implemented as files with the SYSTEM DOS attribute set.


Corinna

--
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
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


Re: NTFS Symlinks (reparse point) redux

by Linda Walsh :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Corinna Vinschen wrote:
> On Nov  5 22:39, Larry Hall (Cygwin) wrote:
>  Cygwin 1.7 does recognize reparse points and especially
> the new NTFS6 symlinks.
---
        Yeah, I have yet to upgrade...going through throws of machine tantrums
now--and OS issues...I hope to give her a spin soon.


> However, it only reads them, never writes them,
> for the reasons repeated by cgf and me a couple of times.
---
        That's fine w/me for the nonce, drives me crazy when I forget about
the ones I've created, let alone all the new ones in use in Vista...


>  You just
> can't use them to store POSIX paths
----
        That would tend to confuse win processes...

        Anyone know what happens under the included POSIX subsystem in
Vista (and I assume Win7), when it creates symlinks?  I can't imagine
they use ".lnk" file extensions -- but if they use "reparse point" links,
I'd think they'd almost have to store posix path information in them.  I
wonder if a posix created symlink is compatible (usable) by a dos/win app?

Maybe there's something usable from the posix subsystem that would work for
both purposes?  Just a thought -- I haven't looked into the posix subsystem
under vista.

> *and* allowing interoperability with
> native Win32 processes, plus the nonsense of coupling them with a user
> right, plus the super-nonsense only to allow Admins to create them by
> default.
---
        Hmmm...can't imagine that being true for the posix symlinks.  Maybe
posix symlinks only work in posix and aren't true symbolic links recognized
by NT.  *sigh*.

>  All that together makes them worse than Windows shortcuts and
> they have not the faintest advantage over Cygwin-only symlinks
> implemented as files with the SYSTEM DOS attribute set.
---
        Well -- 1 advantage.  They work in cygwin and in windows --
by work, I mean the indirection.  Not that every feature one would want
works.  But all cygwin and dos/windows apps blithely follow the links
without knowing they are links.  Same can't be said for ".lnk" based links.
*sigh*.

-l
 


--
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


Re: NTFS Symlinks (reparse point) redux

by Corinna Vinschen-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Nov  9 22:18, Linda Walsh wrote:
> Anyone know what happens under the included POSIX subsystem in
> Vista (and I assume Win7), when it creates symlinks?  I can't imagine
> they use ".lnk" file extensions -- but if they use "reparse point" links,
> I'd think they'd almost have to store posix path information in them.  I
> wonder if a posix created symlink is compatible (usable) by a dos/win app?
>
> Maybe there's something usable from the posix subsystem that would work for
> both purposes?  Just a thought -- I haven't looked into the posix subsystem
> under vista.

Under W7 SUA is still using its own brew of symlinks which is equivalent
to the default Cygwin symlinks:  A file with the SYSTEM DOS attribute
set, a magic cookie ("IntxLNK\1"), and the target filename.  Cygwin 1.7
can read Interix symlinks.  Of course, due to the different directory
tree layout (/cygdrive/c ==> /dev/fs/C), absolute paths in Interix might
point into nirvana under Cygwin.


Corinna

--
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
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