public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: Mounting a network share
Date: Tue, 03 Nov 2015 13:11:00 -0000	[thread overview]
Message-ID: <20151103131105.GE18567@calimero.vinschen.de> (raw)
In-Reply-To: <20151102180623.GA13339@mrvideo.vidiot.com>

[-- Attachment #1: Type: text/plain, Size: 2618 bytes --]

On Nov  2 12:06, Mike Brown wrote:
> On Mon, Nov 02, 2015 at 05:26:51PM +0100, Corinna Vinschen wrote:
> > On Nov  2 10:03, Mike Brown wrote:
> > > On Mon, Nov 02, 2015 at 04:40:33AM +0300, Andrey Repin wrote:
> > > > If you want to do it from Cygwin side, use fstab and don't use /cygdrive
> > > > prefix. It is for automatic mounts ONLY.
> > > 
> > > I went and found the Cygwin web page that describes fstab.  What it doesn't
> > > say is how to use it.
> > 
> > It does: https://cygwin.com/cygwin-ug-net/using.html#mount-table
> 
> What I mean is that I was able to create an entry, but I have no idea how to
> get the mount program to read the contents.
> 
> > > I have the following entry:
> > > 
> > > 192.168.1.40:/Public /Public nfs noacl 0 0
> >   ^^^^^^^^^^^^^^^^^^^^
> > 
> > This syntax isn't known in Windows.  Use the same syntax as with SMB
> > shares, just use forward slashes:
> > 
> >   //192.168.1.40/Public /Public foo binary 0 0
> > 
> > "noacl" has no meaning on NFS shares, btw. 
> 
> No there no explantion on how to enter a user and password.  I tried the nfs
> syntax because it doesn't require a password.

The Cygwin mount is no actual mount command because it doesn't mount
anything.  It's not an OS.  The mount point in Cygwin is just a
translation from DOS to POSIX path as outlined in the documentation.
The first field in fstab is basically the underlying Windows path, just
with forward slashes.  The *actual* mounting, as on Linux, has to be
done on the OS level.

If you have to attach to a remote drive with username and password, you
have to use `net use ...'.  In case of NFS mounts you can also
(preferredly) use the $SYSTEMROOT\\system32\\mount.exe command which is
part of the Windows NFS client installation.  Due to this executable
name clash between Cygwin mount(1) and NFS mount(1) command, you have to
call the latter typically with full path, e.g.

 $ /cygdrive/c/Windows/System32/mount -h

Alternatively, if the mount doesn't require a username/password because
the mapping is done in AD or some RFC2307 service(*), just use the
SMB-like path (even for NFS) in the Cygwin mount table:

 //server/share /cygwin-path foo binary 0 0


HTH,
Corinna


(*) There's also a way to map the anonymous account to a certain
    uid/gid value using a registry entry:
    http://blogs.msdn.com/b/sfu/archive/2009/03/27/can-i-set-up-user-name-mapping-in-windows-vista.aspx

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

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

  parent reply	other threads:[~2015-11-03 13:11 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-01 21:02 Mike Brown
2015-11-02  1:50 ` Andrey Repin
2015-11-02  5:35   ` Mike Brown
2015-11-02 11:16     ` Corinna Vinschen
2015-11-02 16:18     ` Corinna Vinschen
2015-11-02 16:31       ` Roger Wells
2015-11-02 16:03   ` Mike Brown
2015-11-02 16:26     ` Corinna Vinschen
2015-11-02 18:06       ` Mike Brown
2015-11-02 19:50         ` Andrey Repin
2015-11-03 13:11         ` Corinna Vinschen [this message]
2015-11-02 23:37   ` Linda Walsh

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=20151103131105.GE18567@calimero.vinschen.de \
    --to=corinna-cygwin@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).