views:

1842

answers:

2

Hi,

I am a fan of linux but due to worst intel wireless drivers in linux, I had to switch to windows 7. I have installed cygwin in windows and want to configure ssh, to remotely connect to my laptop.

I googled and found this webpage, http://art.csoft.net/2009/09/02/cygwin-ssh-server-and-windows-7/ I am getting the following error when running ssh-host-config.

bala@bala-PC ~
$ ssh-host-config
yes
*** Info: Creating default /etc/ssh_config file
*** Query: Overwrite existing /etc/sshd_config file? (yes/no) yes
*** Info: Creating default /etc/sshd_config file
*** Info: Privilege separation is set to yes by default since OpenSSH 3.3.
*** Info: However, this requires a non-privileged account called 'sshd'.
*** Info: For more info on privilege separation read /usr/share/doc/openssh/READ
ME.privsep.
*** Query: Should privilege separation be used? (yes/no) no
*** Info: Updating /etc/sshd_config file


*** Warning: The following functions require administrator privileges!

*** Query: Do you want to install sshd as a service?
*** Query: (Say "no" if it is already installed as a service) (yes/no) yes
*** Query: Enter the value of CYGWIN for the daemon: []
*** Info: On Windows Server 2003, Windows Vista, and above, the
*** Info: SYSTEM account cannot setuid to other users -- a capability
*** Info: sshd requires.  You need to have or to create a privileged
*** Info: account.  This script will help you do so.

*** Warning: The owner and the Administrators need
*** Warning: to have .w. permission to /var/run.
*** Warning: Here are the current permissions and ACLS:
*** Warning:     drwxr-xr-x 1 bala None 0 2010-01-17 22:34 /var/run
*** Warning:     # file: /var/run
*** Warning:     # owner: bala
*** Warning:     # group: None
*** Warning:     user::rwx
*** Warning:     group::r-x
*** Warning:     other:r-x
*** Warning:     mask:rwx
*** Warning:
*** Warning: Please change the user and/or group ownership,
*** Warning: permissions, or ACLs of /var/run.

*** ERROR: Problem with /var/run directory. Exiting.

The permissions of this folder are shown as Read-only(Only applies to this folder) checked in gray. I tried to uncheck, but after I open the properties again, the box is again checked. Is there a way to change the permissions of this folder.

Thank you

+1  A: 

I'm running cygwin 1.7 on Windows 7 x64 and sshd. I don't remember getting this error when I ran sshd_config, but I just looked at my /var/run directory and it's set to 777.

Try this in a cygwin shell chmod 777 /var/run

karoberts
+1. Change the permissions within Cygwin and try again.
Arkaaito
I tried this option too.bala@bala-PC ~bala@bala-PC ~$ chmod 777 /var/runbala@bala-PC ~$ ls -l /vartotal 0drwxr-xr-x 1 bala None 0 2010-01-17 22:34 cachedrwxr-xr-x 1 bala None 0 2010-01-17 22:35 crondrwxr-xr-x 1 bala None 0 2010-01-23 11:46 emptydrwxr-xr-x 1 bala None 0 2010-01-17 22:34 libdrwxr-xr-x 1 bala None 0 2010-01-17 22:32 logdrwxr-xr-x 1 bala None 0 2010-01-17 22:34 rundrwxr-xr-x 1 bala None 0 2010-01-17 22:34 tmp-rw-r--r-- 1 bala None 0 2010-01-23 11:44 utmp
Algorist
sorry the output doesn't seem to be formatted properly. I have tried -R 777 option too.
Algorist
A: 

In a cygwin shell, make sure you are administrator then:

takeown /F "C:\cygwin" /R
icacls "C:\cygwin" /grant Everyone:\(F\) /T
icacls "C:\cygwin"
chmod 777 -R "c:\cygwin"
N0thing

related questions