From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 81393 invoked by alias); 5 Aug 2019 20:19:44 -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 81386 invoked by uid 89); 5 Aug 2019 20:19:44 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=05082019, 05.08.2019, HX-Spam-Relays-External:sk:!192.16, H*RU:sk:!192.16 X-HELO: mout.kundenserver.de Received: from mout.kundenserver.de (HELO mout.kundenserver.de) (212.227.126.130) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 05 Aug 2019 20:19:42 +0000 Received: from [192.168.178.45] ([95.91.242.183]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.167]) with ESMTPSA (Nemesis) id 1M9nhF-1i0WD83kIP-005qJH for ; Mon, 05 Aug 2019 22:19:39 +0200 Subject: Re: Empty file without "x" permission is successfully executable on Cygwin To: cygwin@cygwin.com References: From: Thomas Wolff Message-ID: <7d007c9f-e98d-f497-d706-dbf94bb563f2@towo.net> Date: Mon, 05 Aug 2019 20:19:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2019-08/txt/msg00059.txt.bz2 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 > -- 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