Subject: Re: bash script execute permissions over NFS
From: [email-masked] (Fergus Henderson)

26 Apr 1998 17:32:56 -0700
Message-ID: <[email-masked]>
References: <Pine.3.07.9804241230.A13289-a100000@crete>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
To: Erik Butterworth <[email-masked]>
Cc: [email-masked]

On 24-Apr-1998, Erik Butterworth <[email-masked]> wrote:
>   I'm running GNU Win-32 Beta 19.1 and Hummingbird's NFS client to connect
> to a Sun Solaris NFS server.  /bin/sh scripts on the server have execute
> permission according to Solaris and according to NT's file Properties
> popup.  However, the ls command under bash shows the script (e.g. 'zork')
> with no execute permission and bash says it can't execute it (file not
> found).

I haven't looked at the source code in any great detail, and most of
what follows is educated guesswork, but I believe that the algorithm
gnu-win32 uses to determine whether a file is `executable' is something
like this:

	- if the file name ends in .bat, .com, or .exe, it is
	  considered executable
	- if the file starts with #!..., it is considered
	  executable
	- on NT, gnu-win32 uses "extended attributes", so files can be
	  explicitly marked as executable. For FAT, these extended
	  attributes are stored by NT in a file called "EA DATA.SF".
	  For NTFS, I guess the file system has native support for them.

> I _really_ don't want to have to rename every script on the system with a .bat suffix. 

An alternative is to insert "#!/bin/sh" as the first line of every script
which doesn't already have that.

-- 
Fergus Henderson <[email-masked]>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger [email-masked]        |     -- the last words of T. S. Garp.
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".