delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/12/22/23:48:07

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-0.9 required=5.0 tests=AWL,BAYES_00
X-Spam-Check-By: sourceware.org
Message-ID: <4EF407E6.4070308@shaddybaddah.name>
Date: Fri, 23 Dec 2011 15:47:34 +1100
From: Shaddy Baddah <lithium-cygwin AT shaddybaddah DOT name>
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:8.0) Gecko/20111124 Thunderbird/8.0
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: sftp-server -h succeeds on cmd, fails on mintty
References: <4EF28545 DOT 4090901 AT shaddybaddah DOT name> <4EF28709 DOT 8000208 AT cygwin DOT com> <4EF29183 DOT 8060408 AT shaddybaddah DOT name> <4EF29826 DOT 4010301 AT cygwin DOT com>
In-Reply-To: <4EF29826.4010301@cygwin.com>
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

Hi,

On 22/12/11 13:38, Larry Hall (Cygwin) wrote:
> On 12/21/2011 9:10 PM, Shaddy Baddah wrote:
>> Hi Larry,
>>
>> On 22/12/11 12:25, Larry Hall (Cygwin) wrote:
>>> On 12/21/2011 8:17 PM, Shaddy Baddah wrote:
>>>> Hi,
>>>>
>>>> I'm experiencing a wider problem with sftp'ing to/from a Cygwin sshd
>>>> service. However as a starting point into debugging, I've identified a
>>>> simple failure in the sftp-server that may give an indication into the
>>>> wider problem.
>>>>
>>>> When I ran just a simple usage argument to sftp-server in a mintty
>>>> session, the command failed:
>>>>
>>>> sbaddah@*********** ~
>>>> $ /usr/sbin/sftp-server -h; x=$?; echo $x
>>>> 127
>>>
>>> This works fine for me from mintty.  Just a shot in the dark but can
>>> you try it with a local user?  How about a local user that's part of
>>> the local Administrators group?
>>
>> Yes, this has made a difference. Thank you. I ran against a local
>> user, although they were not a local administrator. It ran fine:
>>
>> portapps@*********** ~
>> $ /usr/sbin/sftp-server -h
>> usage: sftp-server [-ehR] [-f log_facility] [-l log_level] [-u umask]
>>
>> I guess that points towards a pseudo terminal handling glitch for a
>> domain user, right?
>
> Not definitely, no.  I just tried with my work account (which is a domain
> account) and found no problem.  Although I can't compare directly with
> the your IDs, I have root(0) and Administrators(544) on mine.  Maybe
> try adding
> these if you don't have them already.
>

The user is in the Administrators group of course. But as you only get
Administrators group for your session if you "Run as
administrator"/privilege elevate, I don't run it that way.

But it doesn't matter anyway. Either way, I encounter the same
problem. And this with the latest 1.7.10 snapshot to ensure it isn't
something that's already been fixed.

Also, there is a twist. Running under strace alters the
behaviour. Although I'm not totally surprised by this because I've
seen that strace alters tty I/O when I was debugging a problem a
couple years back
(http://sourceware.org/ml/cygwin-developers/2010-02/msg00043.html).


/Regular session/

sbaddah@*********** ~
$ id -a
uid=42037(sbaddah) gid=10513(Domain Users) groups=10513(Domain
Users),545(Users),<redacted...>

sbaddah@*********** ~
$ /usr/sbin/sftp-server -h; x=$?; echo $x
127

sbaddah@*********** ~
$ strace -o /tmp/sftp.out -f /usr/sbin/sftp-server -h
usage: sftp-server [-ehR] [-f log_facility] [-l log_level] [-u umask]

/Run as administrator session/

sbaddah@*********** ~
$ id -a
uid=42037(sbaddah) gid=10513(Domain Users) groups=10513(Domain
Users),544(Administrators),545(Users),<redacted...>

sbaddah@*********** ~
$ /usr/sbin/sftp-server -h; x=$?; echo $x
127

sbaddah@*********** ~
$ strace -o /tmp/sftp.out -f /usr/sbin/sftp-server -h
usage: sftp-server [-ehR] [-f log_facility] [-l log_level] [-u umask]

I'll start setting up for dll debugging now.

--
Shaddy


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