[vox-tech] [Semi-OT] cygwin ssh and home directory

Jeff Newmiller jdnewmil at dcn.davis.ca.us
Sat Jun 3 20:18:00 PDT 2006


Disclaimer: I have avoided setting up sshd on Windows, because Windows is
so idiosyncratic as a server.  I can throw out a few ideas, though, and
would be interested to hear the actual resolution.

Bill Kendrick wrote:
> I'm setting up OpenSSH server under Cygwin on my WinXP box at work.
> My home directory on my system is a mounted folder:
> 
>   //someserver/users/billk

This is network path notation (UNC).  I would want to verify that sshd
is handing that off to a system call that understands it.

> When I open a normal cygwin terminal shell, I land at the mountpoint I have
> for that folder, my "H:" drive.  In cygwin lingo, that's:
> 
>   /cygdrive/h/

This notation is a fiction maintained by CYGWIN.DLL, and can be changed
using the mount command [1].  Be sure your sshd is part of cygwin if you
want to use this notation.

> However, when I try to ssh into my box

There is a shortage of "how you got to this point" information.

Some answers that might be pertinent are

a) Privilege separation enabled? [1]
b) Did you mkpasswd? [2]
c) What ARE the Windows ACL privileges for your directory? [3]

 > (e.g,:  "ssh localhost" from within
> a cygwin terminal), I get complaints that my home directory is inaccessible:
> 
>   Could not chdir to home directory //someserver/users/billk: Permission denied
>   mkdir: cannot create directory `//someserver/users/billk': File exists
>   Copying skeleton files.
>   These files are for the user to personalise
>   their cygwin experience.
>   
>   These will never be overwritten.
>   
>   /usr/bin/install: cannot create directory `//someserver/users/billk': File exists
>   /usr/bin/install: cannot create directory `//someserver/users/billk': File exists
>   /usr/bin/install: cannot create directory `//someserver/users/billk': File exists
>   -bash: cd: //someserver/users/billk: Permission denied
> 
> 
> I've Googled and found references to "SYSTEM" (uh...?) and messing with
> cygwin's "mount" command, but I've had little luck, and am not sure what
> a good _permanent_ solution is.  (In other words, when I come in tomorrow
> and reboot, I can simply "ssh" without manually mucking with things
> beforehand.)
> 
> 
> (Oh, and FWIW, I'm doing this on my desktop as a sandbox for something we'll
> be running on *ugh* a Windows-based server here at work.)
> 
> Thx in advance!

[1] http://ist.uwaterloo.ca/~kscully/CygwinSSHD_W2K3.html
[2] http://www.gigascale.org/softdevel/faq/19.html
[3] Visible via the folder properties security tab.  I have found that
     cygwin creates directories with different ACLs than My Computer does,
     which has caused some problems when setting up services that need to
     gain access to data in my directories.  Creating the directories with
     My Computer solved the problem when I encountered it, but I wasn't
     sure how to replicate the task in cygwin.

-- 
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                       Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
---------------------------------------------------------------------------


More information about the vox-tech mailing list