From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 108445 invoked by alias); 7 Aug 2019 06:12:37 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 108435 invoked by uid 89); 7 Aug 2019 06:12:37 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: lb2-smtp-cloud9.xs4all.net Received: from lb2-smtp-cloud9.xs4all.net (HELO lb2-smtp-cloud9.xs4all.net) (194.109.24.26) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 07 Aug 2019 06:12:35 +0000 Received: from tmp.tMNe5jAulE ([83.162.234.136]) by smtp-cloud9.xs4all.net with ESMTPSA id vFBThiz7SAffAvFBUh6kZs; Wed, 07 Aug 2019 08:12:28 +0200 Date: Wed, 07 Aug 2019 06:12:00 -0000 Message-ID: From: Houder Reply-To: cygwin@cygwin.com To: cygwin@cygwin.com Subject: Re: Empty file without "x" permission is successfully executable on Cygwin References: In-Reply-to: Content-Type: text/plain; charset=UTF-8; format=fixed User-Agent: mua.awk 0.99 X-SW-Source: 2019-08/txt/msg00096.txt.bz2 On Tue, 6 Aug 2019 19:09:04, Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin" wrote: > > zero-sized? Irrelevant. > > It is actually very relevant. Because executing an empty script results in= > "success" (exit code 0) -- that creates a false-positive. Good morning Anton, Sorry for being brief (and not being clear!). (and sorry for being late to the party :-) What I meant, was: a regular file (empty or not), but w/o shebang and w/o the execute bit, will be executed by Cygwin, contrary to what happens on Unix. This behaviour (again: different from Unix) has existed for at least a decade. That is why I wrote: Cygwin != Linux. When I found out, years and years ago, I assumed that the deviation was due to FAT filesystems (not being able to represent the x-bit). Perhaps I was wrong. Perhaps the Cygwin maintainers merely goofed up long ago. Henri -- 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