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:to:subject:date:message-id:references :in-reply-to:content-type:content-id:content-transfer-encoding :mime-version; q=dns; s=default; b=veRopzWRfLPX2/ZK49apUF5zUMF1U C3A2ivrQESI5g5GbOqjupl1mbOj2AS+sNoogN09vfjBkZb1Dy6TikjOUow73Xzf9 VXU/u9AO5J//AqW19E5ItQLZ4+J6xkTWJgUzRkhdyZ0N/lcN84U0CgX1wwpAMljw AzLaaN3XdX83GM= 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:to:subject:date:message-id:references :in-reply-to:content-type:content-id:content-transfer-encoding :mime-version; s=default; bh=T1oEpveZVRClw8El4orlMK5shL8=; b=ew5 tJhCUNPt/ZGyxiV/7e9q1Vd1WwlhWbpXk7vHy3BsMwj4NQzG2SfbPMeyAaWvVbeF E3SljCAKH0eE4iFlYfvg7WdkrDAf/rFWkLeGUjraIOGE0XZSy580K4PTyoa8a383 rNDvv2OopyjkK/gFLQbSk17TSHqeyGfn9rf0jzlw= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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-Spam-SWARE-Status: No, score=-6.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: NAM01-BY2-obe.outbound.protection.outlook.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PvfwBNcmBNvf4loawbJKfwlKvwIM/57c5dcABC9MQzdkWjBMlPHVBQhmgDnazKLwevRt3+BtNKd+rqkB6dDLGjnkovxQRY/tn4ovAoc7pQ4O5fXCUr45B1pf3skH1uqfZftDtNQlTOjEjEf6/DSyf8rpt4DpuH5B3YaYnoSo+FvfZ+OKECarKUJa5a9pPo5PAM6EV3Q7GhWC85+FsM+4KUxA0uLWLytBjPT+eaGUGJ98CHk89pPK0Aw9Qm5ILpW95Ba6JWXCwOTeeUhkK5SazIw5eDfphkYTJZaaidONxelVu7IwosKn3jUZI5EVJtUkzTuPhNO+bN0ce2UOonr9hA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oIpte+XrIhvqFDWyEUiM6r8H59KZnr9tIxpr+xSvT/M=; b=GHoYCBkKYnKsIoM3BzJvC9GmrBLY8qRkwVkxtIYpuByChyoYQQ0U9sI+c5Bba3C1XofhNfigeF4qNMQze/tM6gwIbAiPQ3lpMT0PTLd8rZPpHaSqm8LaQopjn+LziVtU3ymzyg8kZmDsLKzOPLJi8aBbuTl4b7eH5DnDbKJjnpNgSgwYj1BLYJg2lhQP2L3LYoEbZ12qq8XakVnmsMQOlidUm313Y7nHXJRSkx+ldOpDiSVVUToUxoYaEvjcDUhKiEI9YXTiClZaB1wAY1vz8e96NPLBMRYmrEP40SRfXFqVzq4VjcWwlS5skAnCWAd6XEpPqHXOG1wqhUWBuTtDJA== ARC-Authentication-Results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=cornell.edu;dmarc=pass action=none header.from=cornell.edu;dkim=pass header.d=cornell.edu;arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cornell.edu; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oIpte+XrIhvqFDWyEUiM6r8H59KZnr9tIxpr+xSvT/M=; b=SzGoiDS5TUJVAVin1gk4c+pfEP7fIjK6o+SkWNxmtYB+uxl+drJKy80+oOGVZ3Qi9kOs7JPUS0WDP+80u0sW82G0KgVWGzz0jtZWJgRGh8ztxnhybQSLoTeE0ZT7IijFB0ZSlX1DGpEGqrAt/4pqhZKsOg6KF4kORWx0D3w9ZOs= From: Ken Brown To: "cygwin AT cygwin DOT com" Subject: Re: Empty file without "x" permission is successfully executable on Cygwin Date: Mon, 5 Aug 2019 20:39:48 +0000 Message-ID: <319f78d5-fbcd-712a-ba27-137bd1fbd439@cornell.edu> References: <7d007c9f-e98d-f497-d706-dbf94bb563f2 AT towo DOT net> In-Reply-To: <7d007c9f-e98d-f497-d706-dbf94bb563f2@towo.net> user-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 authentication-results: spf=none (sender IP is ) smtp.mailfrom=kbrown AT cornell DOT edu; x-ms-oob-tlc-oobclassifiers: OLM:7219; received-spf: None (protection.outlook.com: cornell.edu does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 Content-Type: text/plain; charset="utf-8" Content-ID: MIME-Version: 1.0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: ksb2 AT cornell DOT edu X-IsSubscribed: yes Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id x75KeWXt022719 On 8/5/2019 4:19 PM, Thomas Wolff wrote: > > Am 05.08.2019 um 22:01 schrieb Ken Brown: >> On 8/5/2019 2:18 PM, Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin wrote: >>> Hi, >>> >>> Please consider the following shell session: >>> >>> $ cat dummy.c >>> #include >>> >>> int main() >>> { >>>       return 0; >>> } >>> $ gcc -o dummy dummy.c >>> $ mv dummy.exe dummy >>> $ ./dummy >>> $ echo $? >>> 0 >>> $ chmod a-x dummy >>> $ ./dummy >>> -bash: ./dummy: Permission denied >>> $ rm dummy >>> $ touch dummy >>> $ ./dummy >>> $ echo $? >>> 0 >>> >>> So Cygwin lets the shell to execute a zero-sized file regardless of the "x" perm >>> (non-empty files are not executable if they do not have "x", as shown above). >> I can't reproduce this on my system.  Can you show the permissions and ACL of >> dummy? >> >>> There's more.  If I put some rubbish in a file, Cygwin still tries to execute >>> it even if the "x" is not there: >>> >>> $ rm dummy >>> $ echo "1" > dummy >>> $ ./dummy >>> ./dummy: line 1: 1: command not found >> Again I can't reproduce this. > I reproduce the behaviour: > > echo echo foo > bar > > ls -l bar > -rw-r--r-- 1 towo None 9  5. Aug 22:18 bar > > ./bar > foo You're right. I was careless in my test. Sorry for the noise. Ken -- 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