public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "Larry Hall (Cygwin)" <reply-to-list-only-lh@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: Symlinks and sharing a home directory between Windows and Linux
Date: Fri, 16 Dec 2011 03:41:00 -0000	[thread overview]
Message-ID: <4EEABDB8.4020307@cygwin.com> (raw)
In-Reply-To: <jce0v9$eis$1@dough.gmane.org>

On 12/15/2011 6:47 PM, Andrew DeFaria wrote:
> On 12/14/2011 2:32 PM, Andrew DeFaria wrote:
>> On 12/14/2011 12:14 PM, Buchbinder, Barry (NIH/NIAID) [E] wrote:
>>> Might CYGWIN=winsymlinks help?
>>> http://cygwin.com/cygwin-ug-net/using-cygwinenv.html
>> I don't see how. I think that I need the .lnk portion of the file. It's
>> not clear to me from that link's description that setting winsymlinks
>> gives me .lnk.
>>
>> Hmmm... Just tested. Ah yes! The winsymlinks seems to do the trick! Thanks!
>>> More:
>>> http://cygwin.com/faq/faq-nochunks.html#faq.using.symlinkstoppedworking
>>> http://cygwin.com/faq/faq-nochunks.html#faq.api.symlinks
>>>
>> Thanks for the references...
> I'm not sure this is working as well as I had hoped (or remembered). I think
> the question boils down to, given a Unix symlink of say .bash_login and a
> Cygwin symlink of say .bash_login.lnk, which does Cygwin read when logging
> it? I would have hoped that Cygwin would always see the .lnk file whereas
> Unix would see the regular symlink. That's how I thought this worked before.
> But it doesn't seem to be working that way. In fact I see:
>
> $ ls -l .bash*
> -rw-r--r-- 1 adefaria clearusers 7179 Dec 15 15:35 .bash_history
> -rw-r--r-- 1 adefaria clearusers 29 Dec 15 14:36 .bash_login
> -rw-r--r-- 1 adefaria clearusers 29 Dec 15 14:36 .bash_login
> -rw-r--r-- 1 adefaria clearusers 29 Dec 15 14:36 .bashrc
> -rw-r--r-- 1 adefaria clearusers 29 Dec 15 14:36 .bashrc
>
> When I login bash see the Unix formated .bash_login symlink and chokes. I
> can remove this Unix symlink from the Unix side and log in with bash again
> and it works. If I remake the symlink on the Unix side it fails! :-(
>
> I don't remember this being a problem before. I fear this is a Samba config
> thing...
>
> Note: CYGWIN has winsymlinks in it...

I'm having difficulty seeing how what you have described could work unless
the consumers of these files are looking for symlinks only, which your
example above contradicts.  And both of the ".bashrc" files are registering
as plain files, so I think you're right that the file system on which they
reside is coming into play, assuming the output above is from Cygwin's
'ls'.  But even if you had ".bashrc" and ".bashrc.lnk" with the former
being a UNIX-form of symlink and the latter being the Cygwin one, I'd still
expect Cygwin to recognize ".bashrc" first and only go looking for the .lnk
version if it couldn't find that.  The output of strace may convince you
of that as well. ;-)  It might actually work as you describe it though if
you can get Cygwin to think that it can't open the former.  I could see that
being the case if the UNIX symlink was created by a user ID Cygwin didn't
recognize, for example.

-- 
Larry

_____________________________________________________________________

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

  reply	other threads:[~2011-12-16  3:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-14 19:34 Andrew DeFaria
2011-12-14 20:00 ` Jeremy Bopp
2011-12-14 20:15   ` Buchbinder, Barry (NIH/NIAID) [E]
2011-12-14 22:32     ` Andrew DeFaria
2011-12-15 23:48       ` Andrew DeFaria
2011-12-16  3:41         ` Larry Hall (Cygwin) [this message]
2011-12-16 16:21           ` Andrew DeFaria
2011-12-16 16:47             ` Jon Clugston
2011-12-20 17:44               ` Larry Hall (Cygwin)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4EEABDB8.4020307@cygwin.com \
    --to=reply-to-list-only-lh@cygwin.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).