delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2017/11/04/07:47:55

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:from:reply-to:subject:references:to:message-id
:date:mime-version:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=WzaU2o/il/kGQ1bG
MiZ8dbGZXfFLlYB7VWGgJK/FWhkDCuCsZEy2nT3TjrrMsPK4kIJya9t8lH0tZqaw
/ft0Vb5Ax3o+lOGUVAKn7XOsodLhee6LRHBcNJxpOoFtV/ZLWy9uGzB9H184EbT4
pA/p1dW+2wezWhaBNLwdYo6oEWk=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:from:reply-to:subject:references:to:message-id
:date:mime-version:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=EkruAWac8JHe7pE+HE4RD3
msSNc=; b=WdxPQbXWuGjGvpyoG+9PY7pLLY0EXB+sKyKXbifwjc/g2ZStaARPvE
LItYDE+NYdyCtdPVY7P3b7X1xmy4QHxFDtZnk7R6q9zI7IhuwsexdZQLr8asU7E+
dRPpLsn7mYaN81HIXDL4H2LZPJleT11uGTNnK8eTdmGmbNe4cJR70=
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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,FREEMAIL_REPLYTO,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.2 spammy=
X-HELO: mail-pf0-f176.google.com
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:reply-to:subject:references:to:message-id :date:user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=q2tF90PDnfED4U/Z6hQfwIHI4SXcGbNDXWOLagDUm24=; b=GEb5MiKrlJYNhZM0yHjMpXNObS7QzaL/TEvIoExsfLWJNKMIIHIKoCDmm8HMv9nw2g bV5qYnq+o2g61FpT0CrCsE3CaNBTVwYcekLibiTOMXo/FtDxPHeAAWwDSRDq/S+QUKcR FhAESLJHS47jxVkx0RUjbD2AXImWqUVAZZ3KkaTBeYZl47Of8BSzEKtNTDt2ofwPddmA ncpRGHJfuDtyXrX3UHga2gXzM7Y9MvseizYvNkVoaOqdh2H+daFIp0NWqK4l2IS3cYq/ Nanv+Iwlvqxdmz2w+omxNv2/UGtTcKqBq1nenOOblQu73SQueHpsPlOtjnU6VmqhaPrX XoaA==
X-Gm-Message-State: AMCzsaUIvjTsfyc5Lm8JiwFEJqi+Bj2gO2PiLRVdgdXYZFJbL6wXOHQo L27n72N1M9i/Mcyu/S+J4m3pRtx2
X-Google-Smtp-Source: ABhQp+R4IvH04yCUUqgAaExJs/sV/K/5GwCFDHtkYwqpNcV0V5qM32YM7QOy5enSM4KiCD/n9O0CAA==
X-Received: by 10.98.89.6 with SMTP id n6mr10542131pfb.89.1509796058980; Sat, 04 Nov 2017 04:47:38 -0700 (PDT)
From: "Matt D." <codespunk AT gmail DOT com>
X-Google-Original-From: "Matt D." <codespunk+cygwin AT gmail DOT com>
Reply-To: codespunk+cygwin AT gmail DOT com
Subject: Re: No way to use ssh ~/.ssh/config with "noacl" option
References: <59FD8C99 DOT 8010703 AT gmail DOT com> <20171104113723 DOT GC18070 AT calimero DOT vinschen DOT de>
To: cygwin AT cygwin DOT com
Message-ID: <59FDA8D9.6050808@gmail.com>
Date: Sat, 4 Nov 2017 07:47:37 -0400
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0
MIME-Version: 1.0
In-Reply-To: <20171104113723.GC18070@calimero.vinschen.de>

On 11/4/2017 7:37 AM, Corinna Vinschen wrote:
> On Nov  4 05:47, Matt D. wrote:
>> I mount with "noacl" as I don't need ACLs for my purposes and prefer to
>> leave everything up to Windows permissions.
>>
>> The problem with this is that ssh insists that ~/.ssh/config be less
>> permissive. But this file is bound to --rw-r--r-- for this option.
>>
>> Would it be appropriate to request ssh to ignore this requirement when
>> "noacl" present on the mounted volume?
>
> Yes, in theory.  However, this shouldn't be necessary.
>
> Ssh already has code to check extrem perms only in "acl" mounted
> directories, but it does not have this extra check for config files,
> basically because it was never necessary:
>
> If you use noacl, your file perms are faked to always be 644, or
> 444 if the DOS R/O bit is set, or 755/555 if executable/directory.
> Additionally all files are faked as if they are owned by your own
> account.
>
> Ssh checks the config file like this:
>
>    if (((sb.st_uid != 0 && sb.st_uid != getuid()) ||
>        (sb.st_mode & 022) != 0))
> 	  fatal("Bad owner or permissions on %s", filename);
>
> Which means, 0644 permissions are perfectly fine.  As are 755 perms
> for the ~/.ssh and ~ dirs.
>
> I just mounted my home dir "noacl".  The perms are as expected:
>
>    $ ls -ld . .ssh .ssh/config .ssh/id_local
>    drwxr-xr-x 1 corinna vinschen    0 Nov  4 12:27 .
>    drwxr-xr-x 1 corinna vinschen    0 Mar 14  2017 .ssh
>    -rw-r--r-- 1 corinna vinschen  703 Jan 19  2017 .ssh/config
>    -rw-r--r-- 1 corinna vinschen 7329 Jan 12  2017 .ssh/id_local
>
> Note especially the too open perms in case of the private keyfile
> "id_local".  Still, I can ssh into one of my other machines just fine.
>
> How come this doesn't work for you?
>
>
> Corinna
>

I don't know why it doesn't work for me other than the reported error. I 
am trying to use ssh combined with git. My .ssh permissions are:

$ls -ld . .ssh .ssh/config .ssh/github
drwxr-xr-x 1 Matthew D'Onofrio None    0 Nov  4 06:42 .
drwxr-xr-x 1 Matthew D'Onofrio None    0 Nov  4 04:51 .ssh
-rw-r--r-- 1 Matthew D'Onofrio None   80 Nov  4 04:51 .ssh/config
-rw-r--r-- 1 Matthew D'Onofrio None 3243 Nov  3 10:53 .ssh/github

I removed the noacl option in fstab, re-ran Cygwin setup, set 
.ssh/config to 600 and ssh was happy. I then reverted back to noacl and 
the problem returned.

I'm in the process of trying to build openssh with cygpath for debugging 
but this is my first time building anything from Cygwin or using 
cygports so it's taking some time.


Matt D.

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