This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Empty file without "x" permission is successfully executable on Cygwin

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.


Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]