From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?=C3=93scar_Fuentes?= Newsgroups: gmane.emacs.help Subject: Re: Strange behaviour on Windows 10 Date: Fri, 27 Sep 2019 15:45:06 +0200 Message-ID: <87sgohdfa5.fsf@telefonica.net> References: <824l0xoqfq.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="223950"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: help-gnu-emacs@gnu.org To: Pascal Quesseveur Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Sep 27 17:16:09 2019 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iDryZ-000w8F-30 for geh-help-gnu-emacs@m.gmane.org; Fri, 27 Sep 2019 17:16:07 +0200 Original-Received: from localhost ([::1]:52322 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iDryX-0001Km-1B for geh-help-gnu-emacs@m.gmane.org; Fri, 27 Sep 2019 11:16:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39511) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iDqYh-0000Jj-VI for help-gnu-emacs@gnu.org; Fri, 27 Sep 2019 09:45:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iDqYf-0005kT-CN for help-gnu-emacs@gnu.org; Fri, 27 Sep 2019 09:45:19 -0400 Original-Received: from relayout02-redir.e.movistar.es ([86.109.101.202]:25301) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iDqYf-0005jE-5I for help-gnu-emacs@gnu.org; Fri, 27 Sep 2019 09:45:17 -0400 Original-Received: from sky (238.red-79-144-110.dynamicip.rima-tde.net [79.144.110.238]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: 981711563@telefonica.net) by relayout02.e.movistar.es (Postfix) with ESMTPSA id 46ftMl0Dtszdc1p; Fri, 27 Sep 2019 15:45:06 +0200 (CEST) In-Reply-To: <824l0xoqfq.fsf@gmail.com> (Pascal Quesseveur's message of "Fri, 27 Sep 2019 14:48:41 +0200") X-CTCH-Score: 0.000 X-CTCH-ScoreCust: 0.000 X-TnetOut-Country: IP: 79.144.110.238 | Country: ES X-TnetOut-Information: AntiSPAM and AntiVIRUS on relayout02 X-TnetOut-MsgID: 46ftMl0Dtszdc1p.AD51B X-TnetOut-SpamCheck: no es spam, Unknown X-TnetOut-From: ofv@wanadoo.es X-TnetOut-Watermark: 1570196708.32376@YIxaTvnRbGEyQK9qNtCsIw X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 86.109.101.202 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:121570 Archived-At: Pascal Quesseveur writes: > Hello, > > I am encountering a strange problem with emacs on Windows 10 (perhaps > it is not related to emacs but I have not found nothing about it). I > have written a cmd script on Windows 7 which uses plink to launch a > remote command. The script works fine and I use it in emacs through > (call-process) without problems. > > As Windows 10 comes with OpenSSH I decided to update my script and use > ssh instead of plink. The script works fine, but it doesn't work > anymore through (call-process). Calls to ssh cause an error: > > Le chemin d'acc=C3=A8s sp=C3=A9cifi=C3=A9 est introuvable. > > which means the specified filepath cannot be found. ssh.exe is in > C:/Windows/System32/OpenSSH and that directory is in PATH. It seems > that when the script is activated by (call-process) it is unable to > access the C:/Windows/System32/OpenSSH directory. I made the following > test. > > #+BEGIN_EXAMPLE >>type xtest.cmd > @echo off > if exist "C:\Windows\System32" (echo OK) else (echo NOK) > if exist "C:\Windows\System32\OpenSSH" (echo OK) else (echo NOK) > >>xtest > OK > OK > #+END_EXAMPLE > > > and in emacs -Q (version 26.1): > > #+BEGIN_EXAMPLE > (defun xtest() > (interactive) > (call-process "xtest" nil t nil)) > M-x xtest > OK > NOK > #+END_EXAMPLE > > > The problem arises for OpenSHH directory but this is not the only > case. Directory C:\Windows\System32\Microsoft doesn't work either. > The problem is not limited to emacs as I also noted a stange behavior > from which command from EzWin: > > #+BEGIN_EXAMPLE >> which --version > GNU which v2.20, Copyright (C) 1999 - 2008 Carlo Wood. > (Modified for MS-Windows/MinGW by Eli Zaretskii.) >> which ssh.exe > which: no ssh.exe in (.;C:\Program...;C:\WINDOWS\System32\OpenSSH\;...) > #+END_EXAMPLE Cannot reproduce the problem here with your xtest.cmd. Probably a permissions problem. I only know the basics about Windows access control, but maybe your Emacs executable has some attribute that restricts the files it can see. Can you navigate with Dired to the OpenSSH directory? If you execute emacs.exe as Administrator, the problem persists?