This is the mail archive of the cygwin@sourceware.cygnus.com 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]

Re: bash script execute permissions over NFS


On 24-Apr-1998, Erik Butterworth <butterw@bioeng.washington.edu> 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 <fjh@cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh@128.250.37.3        |     -- the last words of T. S. Garp.
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


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