This is the mail archive of the cygwin@cygwin.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]
Other format: [Raw text]

Re: {par script path}: {chld script path}: /bin/bash: bad interpreter:Permission denied


Tom,

I know Cygwin supports Win32 paths.  I suspect the issue here is mount
type (text vs. binary).  If you use a POSIX path, you can control whether
your files are opened in text or binary mode.  To tell the truth, I don't
know exactly what the mode defaults to if a Win32 path is used (and yes, I
could look at the source, but I'm too lazy).  It may well be (and this is
a WAG) that it defaults to text mode, and the '\r' at the end of the "#!"
line is considered part of the shell (thus causing exec to fail).
	Igor

On Fri, 7 Mar 2003 nicebounce at trodman dot com wrote:

> --------
> Igor:
>
> Thanks for your help.  If your right we'd have to update several scripts
> to eliminate drive letters in the path.  Contrary to your hint is this
> snippet from the FAQ: ( http://cygwin.com/cygwin-ug-net/using.html#USING-PATHNAMES ):
>
>   Mapping path names
>   Introduction
>
>   Cygwin supports both Win32- and POSIX-style paths, where directory delimiters may be either
>   forward or back slashes. <snipped>
>
> I prefer the POSIX PATH, but at the time (~1999) the scripts were
> made, we were concerned the mount table might chg out from
> under the script- now I'm not so we could fix the scripts.
>
> When I get a chance to start testing again I'll try to generate the errors
> with the updated "drive letter less" POSIX paths in place.
>
> --
> regards,
> Tom
> perl -e 'print unpack("u", "\.\=\$\!T\<F\]D\;6\%N\+F\-O\;0H\`");'
>
> On Thu 3/6/03 16:22 EST cygwin at cygwin dot com wrote:
> >Tom,
> >
> >On Thu, 6 Mar 2003 Tom Rodman wrote:
> >
> >> <As always thanks for continually improving  cygwin; it's a wonderful set of tools.>
> >>
> >> Here's an error message example:
> >>
> >>   /adm/bin/ccm_build_scripts/run_large_nb.sh: s:/adm/bin/ccm_build_scripts/run_nb.sh: /bin/bash: bad interpreter: Permission denied
> >                                                ^^
> >One thing that comes to mind immediately is why isn't the above a POSIX
> >path?  Don't know if this has to do with your problem, but try changing it
> >to a regular POSIX path (which should be a matter of just removing the
> >"s:"), and see if it helps.
> >	Igor
> >
> >>   "run_nb.sh" aborts immediately, not executing a single line as far as I know.
> >>
> >>   Misc info:
> >>     $ pwd
> >>     /adm/bin/ccm_build_scripts
> >>
> >>     $ head -1 run_large_nb.sh run_nb.sh
> >>     ==> run_large_nb.sh <==
> >>     #!/bin/bash -
> >>
> >>     ==> run_nb.sh <==
> >>     #!/bin/bash -
> >>
> >>     $ ls -l run_large_nb.sh run_nb.sh
> >>     -rwxr-xr-x    1 adm_tsr  SCM_ES_S    54021 Mar  3 11:15 run_large_nb.sh
> >>     -rwxr-xr-x    1 adm_tsr  SCM_ES_S    13322 Sep  3  2002 run_nb.sh
> >>     $ uname -a;echo $CYGWIN
> >>     CYGWIN_NT-5.0 c7mkes123 1.3.20(0.73/3/2) 2003-02-08 12:10 i686 unknown unknown Cygwin
> >>     binmode ntsec tty
> >>
> >> The scripts involved have long been stable. The problem
> >> occurs sporatically. It happened early this week 3 times in
> >> one morning, then I rebooted the box and ran an intensive software
> >> build which exercised both scripts over a 22 hour period
> >> with no problems.
> >>
> >> Problem has been seen on both cygwin 17-1 and 20-1 (we skipped 18-1),
> >> I'm not convinced it's a cygwin problem.  We're running Windows 2000
> >> Server on all boxes involved; I believe our service packs are up to date.
> >>
> >> The scripts reside on a network drive "s:" controlled by an HP VA7400 SAN;
> >> perhaps the problem is SAN related.  The SAN is seen by our remote
> >> w2k file server as a local SCSI block device.  The SAN hardware
> >> is shared by many UNIX or Windows servers- each allocated
> >> separate LUNs.  See cygwin mount table at end of e-mail.
> >>
> >> I can not force the error msg to occur at will even when I make
> >> the parent and/or child script nonexecutable.  Does anyone know
> >> how to force the same error msg that we're getting?
> >>
> >> I've searched my local cygwin mailing list archives for this error,
> >> with no luck.
> >>
> >> Any insights would be appreciated.  Since we run so long between
> >> occurances of this problem, I'm not too concerned.  I wanted to
> >> at least document this somewhat for others that might see it.
> >>
> >> --
> >> thanks/regards,
> >> Tom Rodman
> >>
> >> perl -e 'print unpack("u", "\.\=\$\!T\<F\]D\;6\%N\+F\-O\;0H\`");'
> >>
> >> --v-v------------------C-U-T---H-E-R-E-------------------------v-v--
> >> $ mount # drive S: is a network drive managed by a w2k box, the disk is on a SAN
> >> c:\aut\cyg\bin on /usr/bin type system (binmode)
> >> c:\aut\cyg\lib on /usr/lib type system (binmode)
> >> s:\adm\bin\jcm on /sjcm type system (binmode)
> >> c:\aut\cyg on / type system (binmode)
> >> s:\public on /public type system (binmode,noexec)
> >> s:\prep on /prep type system (binmode,noexec)
> >> s:\user on /user type system (binmode,noexec)
> >> c:\aut on /aut type system (binmode)
> >> s:\adm on /adm type system (binmode)
> >> a: on /drv/a type system (binmode)
> >> c: on /drv/c type system (binmode)
> >> s: on /drv/s type system (binmode,noexec)
> >> y: on /drv/y type system (binmode)

-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha at cs dot nyu dot edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor at watson dot ibm dot com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

Oh, boy, virtual memory! Now I'm gonna make myself a really *big* RAMdisk!
  -- /usr/games/fortune


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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