Web lists-archives.com

Re: Strangeness when binary executable overwritten by text -- bug or feature?




On 10/31/2018 09:27 AM, Reco wrote:
	Hi.

On Wed, Oct 31, 2018 at 09:14:40AM -0500, Richard Owlett wrote:
Debian 9.1 with MATE installed from DVD set.

Due a non-reproducible sequence of events, a binary executable was over written by the contents of a man page in pure text format. For unknown reason, the
resulting file was tagged as executable.

Replace your HDD today, don't give it another chance to corrupt your
data.


Cannot reproduce detailed PEBKAC ;<


A custom MATE launcher pointed the corrupted file.
When the launcher icon was clicked there was no response whatsoever.
Including *NO ERROR MESSAGE*
Is this a bug or a feature?
If a feature, why?

A (mis)feature. Any executable text file without defined shebang is a
shell script. In this case - a syntactically invalid shell script.
So it can be executed, but the child shell will exit immediately.

I think I understand.
Thank you.