public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* virtual box shares are visible in the window, but not in an ssh session
@ 2020-08-17 15:36 marty leisner
  2020-08-17 16:03 ` Eliot Moss
  0 siblings, 1 reply; 8+ messages in thread
From: marty leisner @ 2020-08-17 15:36 UTC (permalink / raw)
  To: cygwin

This is interesting...

I'm running windows 10 in Vbox on linux and use cygwin with a bash shell.

When I start my shell on the windows (and if I run konsole to get screen on
my xdesktop) I see the virtual box share.

But when I ssh in I don't.

Not sure why....

marty

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

* Re: virtual box shares are visible in the window, but not in an ssh session
  2020-08-17 15:36 virtual box shares are visible in the window, but not in an ssh session marty leisner
@ 2020-08-17 16:03 ` Eliot Moss
  2020-08-17 16:11   ` marty leisner
  2020-08-17 16:15   ` Jason Pyeron
  0 siblings, 2 replies; 8+ messages in thread
From: Eliot Moss @ 2020-08-17 16:03 UTC (permalink / raw)
  To: marty leisner, cygwin

On 8/17/2020 11:36 AM, marty leisner via Cygwin wrote:
> This is interesting...
> 
> I'm running windows 10 in Vbox on linux and use cygwin with a bash shell.
> 
> When I start my shell on the windows (and if I run konsole to get screen on
> my xdesktop) I see the virtual box share.
> 
> But when I ssh in I don't.
> 
> Not sure why....

Dear Marty: I think we (I, anyway) can be more helpful with some more information.

- What is "the virtual box share" here?

- What does "see" mean?  That is, what specific command(s) are you using, and what are the
   outputs you get that lead you to this conclusion?

- Are we talking about Cygwin bash in both cases?  The same user logged in?

Regards - Eliot Moss

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

* Re: virtual box shares are visible in the window, but not in an ssh session
  2020-08-17 16:03 ` Eliot Moss
@ 2020-08-17 16:11   ` marty leisner
  2020-08-17 16:32     ` Eliot Moss
  2020-08-17 21:15     ` Andrey Repin
  2020-08-17 16:15   ` Jason Pyeron
  1 sibling, 2 replies; 8+ messages in thread
From: marty leisner @ 2020-08-17 16:11 UTC (permalink / raw)
  To: moss; +Cc: cygwin

Its a virtual box shared folder -- I'm mapping "src" to /usr/local/src on
the host system.

$ df
Filesystem     1K-blocks      Used Available Use% Mounted on
C:/cygwin64     51856440  45548104   6308336  88% /
D:                 48666     48666         0 100% /cygdrive/d
E:             302054400 237185024  64869376  79% /cygdrive/e
$ mount
C:/cygwin64/bin on /usr/bin type ntfs (binary,auto)
C:/cygwin64/lib on /usr/lib type ntfs (binary,auto)
C:/cygwin64 on / type ntfs (binary,auto)
C: on /cygdrive/c type ntfs (binary,posix=0,user,noumount,auto)
D: on /cygdrive/d type iso9660 (binary,posix=0,user,noumount,auto)
E: on /cygdrive/e type vboxsharedfolderfs
(binary,posix=0,user,noumount,auto)

$ id
uid=197609(marty) gid=197609(marty) groups=197609(marty),401408(Medium
Mandatory Level),545(Users),559(Performance Log
Users),4(INTERACTIVE),66049(CONSOLE LOGON),11(Authenticated Users),15(This
Organization),68578(MicrosoftAccount+martyleisner@yahoo.com),113(Local
account),4095(CurrentSession),66048(LOCAL),262180(Cloud Account
Authentication)

This is in the remote ssh:
$ df
Filesystem     1K-blocks     Used Available Use% Mounted on
C:/cygwin64     51856440 45549844   6306596  88% /
D:                 48666    48666         0 100% /cygdrive/d

marty@windows10 ~
$ mount
C:/cygwin64/bin on /usr/bin type ntfs (binary,auto)
C:/cygwin64/lib on /usr/lib type ntfs (binary,auto)
C:/cygwin64 on / type ntfs (binary,auto)
C: on /cygdrive/c type ntfs (binary,posix=0,user,noumount,auto)
D: on /cygdrive/d type iso9660 (binary,posix=0,user,noumount,auto)

marty@windows10 ~
$ id
uid=197609(marty) gid=197609(marty)
groups=197609(marty),197121(None),114(Local account and member of
Administrators
group),544(Administrators),545(Users),2(NETWORK),11(Authenticated
Users),15(This Organization),113(Local account),4095(CurrentSession),68578(
MicrosoftAccount+martyleisner@yahoo.com),262154(NTLM
Authentication),405504(High Mandatory Level)

marty

On Mon, Aug 17, 2020 at 12:03 PM Eliot Moss <moss@cs.umass.edu> wrote:

> On 8/17/2020 11:36 AM, marty leisner via Cygwin wrote:
> > This is interesting...
> >
> > I'm running windows 10 in Vbox on linux and use cygwin with a bash shell.
> >
> > When I start my shell on the windows (and if I run konsole to get screen
> on
> > my xdesktop) I see the virtual box share.
> >
> > But when I ssh in I don't.
> >
> > Not sure why....
>
> Dear Marty: I think we (I, anyway) can be more helpful with some more
> information.
>
> - What is "the virtual box share" here?
>
> - What does "see" mean?  That is, what specific command(s) are you using,
> and what are the
>    outputs you get that lead you to this conclusion?
>
> - Are we talking about Cygwin bash in both cases?  The same user logged in?
>
> Regards - Eliot Moss
>

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

* RE: [cygwin] Re: virtual box shares are visible in the window, but not in an ssh  session
  2020-08-17 16:03 ` Eliot Moss
  2020-08-17 16:11   ` marty leisner
@ 2020-08-17 16:15   ` Jason Pyeron
  2020-08-17 16:36     ` Eliot Moss
  1 sibling, 1 reply; 8+ messages in thread
From: Jason Pyeron @ 2020-08-17 16:15 UTC (permalink / raw)
  To: cygwin

> -----Original Message-----
> From: Eliot Moss
> Sent: Monday, August 17, 2020 12:04 PM
> 
> On 8/17/2020 11:36 AM, marty leisner via Cygwin wrote:
> > This is interesting...
> >
> > I'm running windows 10 in Vbox on linux and use cygwin with a bash shell.
> >
> > When I start my shell on the windows (and if I run konsole to get screen on
> > my xdesktop) I see the virtual box share.
> >
> > But when I ssh in I don't.

Please understand that if the user is an admin, it will be with the highest permissions. Also if logging in via PKI instead of password you will have a slightly different security token. Is this a an Active Directory joined machine?

> >
> > Not sure why....
> 

Please test/demonstrate the following:

Run CMD.exe

dir \\virtual\box\share\folder\

Run CMD as admin

dir \\virtual\box\share\folder\

Run cygterm

ls //virtual/box/share/folder/

Run cygterm as admin

ls //virtual/box/share/folder/

create local user, not in the Administrators group (regular user)

ssh in "your normal way"

id -G
# does it have 544 listed?

ssh in using password

ls //virtual/box/share/folder/

> Dear Marty: I think we (I, anyway) can be more helpful with some more information.
> 
> - What is "the virtual box share" here?

If it is like VMWare, then it is a windows file share provided by a special device driver.

If not, it ***MAY*** require some agent to run at user log on.

> 
> - What does "see" mean?  That is, what specific command(s) are you using, and what are the
>    outputs you get that lead you to this conclusion?
> 
> - Are we talking about Cygwin bash in both cases?  The same user logged in?

@Marty - please answer Eliot's questions too,



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

* Re: virtual box shares are visible in the window, but not in an ssh session
  2020-08-17 16:11   ` marty leisner
@ 2020-08-17 16:32     ` Eliot Moss
  2020-08-17 21:15     ` Andrey Repin
  1 sibling, 0 replies; 8+ messages in thread
From: Eliot Moss @ 2020-08-17 16:32 UTC (permalink / raw)
  Cc: cygwin

On 8/17/2020 12:11 PM, marty leisner wrote:
> Its a virtual box shared folder -- I'm mapping "src" to /usr/local/src on the host system.
> 
> $ df
> Filesystem     1K-blocks      Used Available Use% Mounted on
> C:/cygwin64     51856440  45548104   6308336  88% /
> D:                 48666     48666         0 100% /cygdrive/d
> E:             302054400 237185024  64869376  79% /cygdrive/e
> $ mount
> C:/cygwin64/bin on /usr/bin type ntfs (binary,auto)
> C:/cygwin64/lib on /usr/lib type ntfs (binary,auto)
> C:/cygwin64 on / type ntfs (binary,auto)
> C: on /cygdrive/c type ntfs (binary,posix=0,user,noumount,auto)
> D: on /cygdrive/d type iso9660 (binary,posix=0,user,noumount,auto)
> E: on /cygdrive/e type vboxsharedfolderfs (binary,posix=0,user,noumount,auto)
> 
> $ id
> uid=197609(marty) gid=197609(marty) groups=197609(marty),401408(Medium Mandatory 
> Level),545(Users),559(Performance Log Users),4(INTERACTIVE),66049(CONSOLE LOGON),11(Authenticated 
> Users),15(This Organization),68578(MicrosoftAccount+martyleisner@yahoo.com 
> <mailto:MicrosoftAccount%2Bmartyleisner@yahoo.com>),113(Local 
> account),4095(CurrentSession),66048(LOCAL),262180(Cloud Account Authentication)
> 
> This is in the remote ssh:
> $ df
> Filesystem     1K-blocks     Used Available Use% Mounted on
> C:/cygwin64     51856440 45549844   6306596  88% /
> D:                 48666    48666         0 100% /cygdrive/d
> 
> marty@windows10 ~
> $ mount
> C:/cygwin64/bin on /usr/bin type ntfs (binary,auto)
> C:/cygwin64/lib on /usr/lib type ntfs (binary,auto)
> C:/cygwin64 on / type ntfs (binary,auto)
> C: on /cygdrive/c type ntfs (binary,posix=0,user,noumount,auto)
> D: on /cygdrive/d type iso9660 (binary,posix=0,user,noumount,auto)
> 
> marty@windows10 ~
> $ id
> uid=197609(marty) gid=197609(marty) groups=197609(marty),197121(None),114(Local account and member 
> of Administrators group),544(Administrators),545(Users),2(NETWORK),11(Authenticated Users),15(This 
> Organization),113(Local account),4095(CurrentSession),68578(MicrosoftAccount+martyleisner@yahoo.com 
> <mailto:MicrosoftAccount%2Bmartyleisner@yahoo.com>),262154(NTLM Authentication),405504(High 
> Mandatory Level)

So we see that in the second case, E: is not seen by Cygwin.  Does Windows show it to be mounted?  I 
am wondering if the difference is something about VBox and Windows not mounting E: in the second 
case, or if it is something about Cygwin not picking up on E: even if it _is_ mounted.  In the first 
case, it's not a Cygwin issue, but a Windows/VBox one.  In the second case, it's something about 
Cygwin, and we would want information about what Windows shows about the mounted E: share.

Regards - Eliot

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

* Re: [cygwin] Re: virtual box shares are visible in the window, but not in an ssh session
  2020-08-17 16:15   ` Jason Pyeron
@ 2020-08-17 16:36     ` Eliot Moss
  0 siblings, 0 replies; 8+ messages in thread
From: Eliot Moss @ 2020-08-17 16:36 UTC (permalink / raw)
  To: cygwin

Indeed Jason has a good point.

IIRC, VBox shares are normally privileged, so if in one case the logged in user has more rights, 
that could explain the difference.  I do see that 'id' reports somewhat different things in the two 
cases, though I am not enough of an expert on Windows users and their permissions to point to the 
"smoking gun" that might cause the difference.

Best - EM

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

* Re: virtual box shares are visible in the window, but not in an ssh session
  2020-08-17 16:11   ` marty leisner
  2020-08-17 16:32     ` Eliot Moss
@ 2020-08-17 21:15     ` Andrey Repin
  2020-08-17 22:21       ` [cygwin] " Jason Pyeron
  1 sibling, 1 reply; 8+ messages in thread
From: Andrey Repin @ 2020-08-17 21:15 UTC (permalink / raw)
  To: marty leisner, cygwin

Greetings, marty leisner!

[ Please do not top-post in this list. ]

> Its a virtual box shared folder -- I'm mapping "src" to /usr/local/src on
> the host system.

> $ df
> Filesystem     1K-blocks      Used Available Use% Mounted on
> C:/cygwin64     51856440  45548104   6308336  88% /
> D:                 48666     48666         0 100% /cygdrive/d
> E:             302054400 237185024  64869376  79% /cygdrive/e
> $ mount
> C:/cygwin64/bin on /usr/bin type ntfs (binary,auto)
> C:/cygwin64/lib on /usr/lib type ntfs (binary,auto)
> C:/cygwin64 on / type ntfs (binary,auto)
> C: on /cygdrive/c type ntfs (binary,posix=0,user,noumount,auto)
> D: on /cygdrive/d type iso9660 (binary,posix=0,user,noumount,auto)
> E: on /cygdrive/e type vboxsharedfolderfs
> (binary,posix=0,user,noumount,auto)

Don't map shares to disk letters.
It's that simple.

> $ id
> uid=197609(marty) gid=197609(marty) groups=197609(marty),401408(Medium
> Mandatory Level),545(Users),559(Performance Log
> Users),4(INTERACTIVE),66049(CONSOLE LOGON),11(Authenticated Users),15(This
> Organization),68578(MicrosoftAccount+martyleisner@yahoo.com),113(Local
> account),4095(CurrentSession),66048(LOCAL),262180(Cloud Account
> Authentication)

> This is in the remote ssh:
> $ df
> Filesystem     1K-blocks     Used Available Use% Mounted on
> C:/cygwin64     51856440 45549844   6306596  88% /
> D:                 48666    48666         0 100% /cygdrive/d

Indeed, logging in via SSH, you get a separate session, in which your drives
aren't mapped.
See above, drop this poor habit of mapping them to letters.
Use UNC paths directly or symlink them at convenient locations.


-- 
With best regards,
Andrey Repin
Tuesday, August 18, 2020 0:13:28

Sorry for my terrible english...


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

* RE: [cygwin] Re: virtual box shares are visible in the window, but not in an ssh session
  2020-08-17 21:15     ` Andrey Repin
@ 2020-08-17 22:21       ` Jason Pyeron
  0 siblings, 0 replies; 8+ messages in thread
From: Jason Pyeron @ 2020-08-17 22:21 UTC (permalink / raw)
  To: cygwin

> From: Andrey Repin
> Sent: Monday, August 17, 2020 5:16 PM
> 
<snip/>
> > E: on /cygdrive/e type vboxsharedfolderfs
> > (binary,posix=0,user,noumount,auto)
> 
> Don't map shares to disk letters.
> It's that simple.
> 
<snip/>
> > This is in the remote ssh:
> > $ df
> > Filesystem     1K-blocks     Used Available Use% Mounted on
> > C:/cygwin64     51856440 45549844   6306596  88% /
> > D:                 48666    48666         0 100% /cygdrive/d
> 
> Indeed, logging in via SSH, you get a separate session, in which your drives
> aren't mapped.
> See above, drop this poor habit of mapping them to letters.
> Use UNC paths directly or symlink them at convenient locations.

In my experience it is not that simple, the UNC will still likely have access issues, hence my request for tests.

We typically use the fstab to mount them in Cygwin, since things like git misbehave with all the slashes. But even then if the user context (due to admin or AD) is wonky - no access.


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

end of thread, other threads:[~2020-08-17 22:21 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-17 15:36 virtual box shares are visible in the window, but not in an ssh session marty leisner
2020-08-17 16:03 ` Eliot Moss
2020-08-17 16:11   ` marty leisner
2020-08-17 16:32     ` Eliot Moss
2020-08-17 21:15     ` Andrey Repin
2020-08-17 22:21       ` [cygwin] " Jason Pyeron
2020-08-17 16:15   ` Jason Pyeron
2020-08-17 16:36     ` Eliot Moss

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