delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/04/26/17:32:56

From: fjh AT cs DOT mu DOT OZ DOT AU (Fergus Henderson)
Subject: Re: bash script execute permissions over NFS
26 Apr 1998 17:32:56 -0700 :
Message-ID: <19980427022056.37662.cygnus.gnu-win32@murlibobo.cs.mu.OZ.AU>
References: <Pine DOT 3 DOT 07 DOT 9804241230 DOT A13289-a100000 AT crete>
Mime-Version: 1.0
To: Erik Butterworth <butterw AT bioeng DOT washington DOT edu>
Cc: gnu-win32 AT cygnus DOT com

On 24-Apr-1998, Erik Butterworth <butterw AT bioeng DOT washington DOT 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 AT cs DOT mu DOT oz DOT 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 AT 128 DOT 250 DOT 37 DOT 3        |     -- the last words of T. S. Garp.
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019