delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/04/04/16:17:23

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_YE,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
Message-ID: <COL102-W43EF8B4D23C6886C30B4A6B5320@phx.gbl>
From: Karl M <karlm30 AT hotmail DOT com>
To: <cygwin AT cygwin DOT com>
Subject: chmod problem
Date: Wed, 4 Apr 2012 13:16:50 -0700
MIME-Version: 1.0
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id q34KHI15009336


Hi All...
 

On a recent Cygwin install on a new win7-64 machine, I ran into a problem. The ssh service would not start because the protection on the /etc/ssh_host_rsa_key was too weak. (I use only the rsa host key.)

If I chmod the file to 600, all is well. But...if I do it within a shell script, the chmod has no effect. Below is a short test case and a bash -x run of the script?
 

$ cat test-config
chown administrators /etc/ssh*
ls -al /etc/ssh_host_rsa_key
chmod -v 600 /etc/ssh_host_rsa_key
ls -al /etc/ssh_host_rsa_key
$ cat test-config
chown administrators /etc/ssh*
ls -al /etc/ssh_host_rsa_key
chmod -v 600 /etc/ssh_host_rsa_key
ls -al /etc/ssh_host_rsa_key
 

$ bash -x test-config
+ chown administrators /etc/ssh_host_rsa_key /etc/ssh_host_rsa_key.pub /etc/sshd_config
+ ls -al /etc/ssh_host_rsa_key
-rw-rw---- 1 Administrators root 1675 Apr 4 11:30 /etc/ssh_host_rsa_key
+ chmod -v 600 /etc/ssh_host_rsa_key
mode of `/etc/ssh_host_rsa_key' changed from 0660 (rw-rw----) to 0600 (rw-------)
+ ls -al /etc/ssh_host_rsa_key
-rw-rw---- 1 Administrators root 1675 Apr 4 11:30 /etc/ssh_host_rsa_key

This test was on a fresh (1.7.12) from this morning.
 

Long term, this may be a csih issue, but I was just making a workaround for now...but my workaroung failed to workaround.

Thanks,
 


...Karl  		 	   		  

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


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019