Environment to run tests in, changing file permissions on Cygwin

Dr Rainer Woitok rainer.woitok at gmail.com
Fri Jan 29 10:55:40 UTC 2016


Matt,

On Friday, 2016-01-29 11:05:22 +0100, I myself wrote:

> ...
> On Thursday, 2016-01-28 13:08:52 -0600, you wrote:
> > ...
> > What does "hg debugfs" say?
> 
> $ /bin/hg debugfs
> exec: no
> ...
> $

What precisely  does that mean?   What does Python  think is  wrong with
Cygwin's  (or Windows')  execution bits?   I just  did a  little testing
which shows that Cygwin correctly  changes the Windows ACLs and that the
execution bits are in fact respected:

$ PS4=' $ ' ksh -x ~/scr/execbit-test 
 $ umask 077
 $ >x 
 $ echo '#! /bin/ksh'
 $ >>x 
 $ echo 'echo executed!'
 $ ls -l x
-rw------- 1 Rainer win 27 2016-01-29 11:31 x
 $ icacls x
x NULL SID:(DENY)(Rc,S)
  tablet\Rainer:(R,W,D,WDAC,WO)
  tablet\None:(Rc,S,RA)
  Everyone:(Rc,S,RA)

Successfully processed 1 files; Failed processing 0 files
 $ ./x
/home/Rainer/scr/execbit-test[6]: ./x: can't execute: Permission denied
 $ chmod +x x
 $ ls -l x
-rwx------ 1 Rainer win 27 2016-01-29 11:31 x
 $ icacls x
x NULL SID:(DENY)(Rc,S)
  tablet\Rainer:(F)
  tablet\None:(Rc,S,RA)
  Everyone:(Rc,S,RA)

Successfully processed 1 files; Failed processing 0 files
 $ ./x
executed!
 $ chmod -x x
 $ ls -l x
-rw------- 1 Rainer win 27 2016-01-29 11:31 x
 $ icacls x
x NULL SID:(DENY)(Rc,S)
  tablet\Rainer:(R,W,D,WDAC,WO)
  tablet\None:(Rc,S,RA)
  Everyone:(Rc,S,RA)

Successfully processed 1 files; Failed processing 0 files
 $ ./x
/home/Rainer/scr/execbit-test[14]: ./x: can't execute: Permission denied
 $ rm x

Is this perhaps a problem with Python under Cygwin rather than with Cyg-
win's or Windows' execution bits?

Sincerely,
  Rainer



More information about the Mercurial mailing list