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: chmod


just tried with ntsec enabled. if run as ./foo.sh the script foo.sh will run
whether or not the executable bit is set. the only difference was that bash
wouldn't auto complete it for me when not marked as executable ;) 

> -----Original Message-----
> From: Kris Thielemans [mailto:kris.thielemans@csc.mrc.ac.uk]
> Sent: 16 October 2002 11:38
> To: CygWin Users' List; Andrei Cernea
> Subject: RE: chmod
> 
> 
> Hi Andrei,
> 
> we see only part of your problem here. However, if you're 
> asking on how to
> make cygwin recognise that a shell script is executable, you 
> should put
> #! /bin/sh
> as first line in the script. No chmod necessary (This is a 
> FAQ actually).
> (I don't know if chmod would work/is necessary with the ntsec feature
> enabled. Hopefully someone else can clarify this and put it in the
> FAQ/User's guide)
> 
> Kris Thielemans
> (kris.thielemans <at> ic.ac.uk)
> Imaging Research Solutions Ltd
> Cyclotron Building
> Hammersmith Hospital
> Du Cane Road
> London W12 ONN, United Kingdom
> 
> web site address: http://www.irsl.org/~kris
> >
> > Andrei --
> >
> > ...and then Andrei Cernea said...
> > %
> > % Hi!
> > %
> > % I am using Cygwin 2.05. I am emailing you because of this:
> > %
> > % ============================================
> > % > chmod --help
> > ...
> > %
> > % Report bugs to <bug-fileutils@gnu.org>.
> > % ============================================
> > %
> > % I noticed that in order for a file to have x rights on windows
> > it needs to
> > % have executable extension. That is, if I have a script 
> file with no
> > [snip]
> >
> > Well, yes and no...  If it has a .exe or .com or .bat 
> extension, then
> > it's considered obvious that it should be executable and so 
> the x bit is
> > set for you.  As I understand it, if you want to be able to 
> run a shell
> > script without having to use
> >
> >   bash /path/to/script
> >
> > then you'll need to set the x bit.  IIRC there's a way to 
> tell Windows
> > and the Cygwin DLL to recognize .sh extensions, just like it already
> > recognizes the other three, and then naming your shell scripts
> > appropriately will make them executable.  Note that I don't 
> think that
> > this is the same as typical file extensions, but I could be 
> wrong.  Then
> > you could tie .pl to perl and who knows what else, too.  Perhaps all
> > that's necessary to have the system honor the shebang line 
> is the x bit;
> > it's been a while since I was an active cygwin reader.
> >
> > The bottom line is that you should direct your question to 
> the cygwin
> > mailing list, where I've sent a copy of this message (Hi, 
> all! Long time,
> > no see :-) and to which I've directed followups.  Yes, the reporting
> > address is the bug-fileutils mailing list, but this isn't a bug but
> > instead a peculiarity of the cygwin environment.
> >
> >
> > HTH & HAND
> >
> > :-D
> > --
> > David T-G                      * There is too much animal courage in
> > (play) davidtg@justpickone.org * society and not sufficient 
> moral courage.
> > (work) davidtgwork@justpickone.org  -- Mary Baker Eddy, "Science
> > and Health"
> > http://www.justpickone.org/davidtg/    Shpx gur Pbzzhavpngvbaf
> > Qrprapl Npg!
> >
> >
> >
> >
> 
> 
> --
> 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/
> 

--
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]