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:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=GB993YxSBj2SNtpt mKEcoj+Y1mjU23Kh5VjQ9yyVBh9I78LI9ykeYSJNhB7xX7BNL+nIDVIEE8zS6uOP vknPuwNOnaNvY1JUD8vtj96jZUrtS+zn++XvHy4/ko9p9YOE1YI/gHScMOyRr03C U2uuG5z6OxsqrloL8uVfLm/tgyk= 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:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=ppkIwqPMxCVrseqVO95m0R XrFmM=; b=f6A+RRgiMG8yRwRGDhqysrg3eOxSNZBhhi7x7awXx7edeFGMih6IaJ kvv6VQYyX5EsTjSafCZHi87pNSQkNJwxHMCVgjxXnBnSUKvTCIysPnN/cd3NMouW rAKj+IWCJKIDibKqXA4Nu7B6RAYtNOxidVjVVtsYpxORmUclXGVG8= 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=-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 Subject: Re: Empty file without "x" permission is successfully executable on Cygwin To: cygwin AT cygwin DOT com References: From: Thomas Wolff Message-ID: <7d007c9f-e98d-f497-d706-dbf94bb563f2@towo.net> Date: Mon, 5 Aug 2019 22:19:39 +0200 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 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