public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* error mounting smb shared with ~ in name
@ 2012-03-31  4:52 Daniel D
  2012-03-31  6:26 ` Thorsten Kampe
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel D @ 2012-03-31  4:52 UTC (permalink / raw)
  To: cygwin

Howdy,

Is ~ allowed on a smb share name when mounting it? I keep getting errors 
while trying to mount //server/~foo via fstab.

If yes, can someone give me some tips for what to do to mount a share named 
\\server\~foo ?

Here’s what I already tried:
    - ls //server/~foo works – prints out the content for the dir
    - editing fstab, and adding
        //server/~foo /mnt/~foo smbfs binary,noacl 0 0
    then doing
        mount –a.
    This printed out
        mount: /mnt/~foo: Invalid argument
    - changing in fstab, from //server/~foo to //server/xyz  -- this worked. 
I.e. mount –a does not print out ‘mount: /mnt/~foo: Invalid argument’, and 
`ls /mnt/~foo` prints out the content of //server/xzy
    - mounting the smb share directly did not worked either. Running
        mount //server/~foo /mnt/foo
    also prints out the invalid argument error.
It looks like mount command does not like ~ in the smb share name, though it 
is fine with ~ in the the mount point name. Unfortunately changing the share 
name is not an easy task, and I prefer making this work rather than always 
using long paths with hard-coded remote hostnames.

TIA for any help. 


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: error mounting smb shared with ~ in name
  2012-03-31  4:52 error mounting smb shared with ~ in name Daniel D
@ 2012-03-31  6:26 ` Thorsten Kampe
  2012-04-01 17:00   ` Daniel D
  0 siblings, 1 reply; 4+ messages in thread
From: Thorsten Kampe @ 2012-03-31  6:26 UTC (permalink / raw)
  To: cygwin

* Daniel D (Fri, 30 Mar 2012 21:52:35 -0700)
> 
> Is ~ allowed on a smb share name when mounting it? I keep getting errors 
> while trying to mount //server/~foo via fstab.
> 
> If yes, can someone give me some tips for what to do to mount a share named 
> \\server\~foo ?
> [...]
> It looks like mount command does not like ~ in the smb share name, 
though it 
> is fine with ~ in the the mount point name.

That's a shell issue not a mount issue. ~foo refers to the home 
directory of user foo. Either escape the ~ or quote the argument 
containing the ~.

Thorsten


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: error mounting smb shared with ~ in name
  2012-03-31  6:26 ` Thorsten Kampe
@ 2012-04-01 17:00   ` Daniel D
  2012-04-02 14:00     ` Thorsten Kampe
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel D @ 2012-04-01 17:00 UTC (permalink / raw)
  To: cygwin

> Thorsten Kampe <thorsten <at> thorstenkampe.de> writes:
> 
> > 
> > * Daniel D (Fri, 30 Mar 2012 21:52:35 -0700)
> > > 
> > > Is ~ allowed on a smb share name when mounting it? I keep getting errors 
> > > while trying to mount //server/~foo via fstab.
> > > 
> > > If yes, can someone give me some tips for what to do to mount a share
> > > named 
> > > \\server\~foo ?
> > > [...]
> > > It looks like mount command does not like ~ in the smb share name, 
> > though it 
> > > is fine with ~ in the the mount point name.
> > 
> That's a shell issue not a mount issue. ~foo refers to the home 
> directory of user foo. Either escape the ~ or quote the argument 
> containing the ~.

Hi Thorsten,

Thank you for the quick reply, however I still could not make it work:
    mount //server/\176foo /mnt/foo
prints out no error, as if everything works out, however
    ls /mnt/foo
errors out with 'no such file or directory'.
From my experiments, the mount is not performed successfully in spite of
no errors printed out. The mount commands succeeds only because
//server/\176foo path is interpreted as //server/176foo; and since it is not
checked for existence, doing the subsequent ls /mnt/foo prints out
the error.

Moreover, in the same shell (bash/mintty), this works:
    ls //server/~foo
(returns the right set of files), so if this is truly a shell issue,
why does ls work?
As a side note, ls //server/\176foo does not work (prints out 'No such file
or directory').

If you (or anyone else) have any other ideas, I would appreciate it.
Lastly, has anyone tried this and got it to work on their machine using the
current cygwin version? If yes, can you please post your exact 
fstab entry (or mount command)?

BTW, the mount version I'm using is 1.7.11 (I updated cygwin couple of days
ago).

TIA,
Daniel



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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: error mounting smb shared with ~ in name
  2012-04-01 17:00   ` Daniel D
@ 2012-04-02 14:00     ` Thorsten Kampe
  0 siblings, 0 replies; 4+ messages in thread
From: Thorsten Kampe @ 2012-04-02 14:00 UTC (permalink / raw)
  To: cygwin

* Daniel D (Sun, 1 Apr 2012 07:49:49 +0000 (UTC))
> 
> > Thorsten Kampe <thorsten <at> thorstenkampe.de> writes:
> > > * Daniel D (Fri, 30 Mar 2012 21:52:35 -0700)
> > > > 
> > > > Is ~ allowed on a smb share name when mounting it? I keep getting errors 
> > > > while trying to mount //server/~foo via fstab.
> > > > 
> > > > If yes, can someone give me some tips for what to do to mount a share
> > > > named 
> > > > \\server\~foo ?
> > > > [...]
> > > > It looks like mount command does not like ~ in the smb share name, 
> > > though it 
> > > > is fine with ~ in the the mount point name.
> > > 
> > That's a shell issue not a mount issue. ~foo refers to the home 
> > directory of user foo. Either escape the ~ or quote the argument 
> > containing the ~.
> 
> Thank you for the quick reply, however I still could not make it work:
>     mount //server/\176foo /mnt/foo
> prints out no error, as if everything works out, however
>     ls /mnt/foo

I said "escape or quote":

mount //server/\~foo /mnt/foo

mount "//server/~foo" /mnt/foo

Thorsten


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-04-02 14:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-31  4:52 error mounting smb shared with ~ in name Daniel D
2012-03-31  6:26 ` Thorsten Kampe
2012-04-01 17:00   ` Daniel D
2012-04-02 14:00     ` Thorsten Kampe

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