ntsec and shell script problem

Corinna Vinschen cygwin@cygwin.com
Sat Jun 2 08:27:00 GMT 2001

On Sat, Jun 02, 2001 at 11:11:48PM +1000, Robert Collins wrote:
> This is just a bug report, I've got no suggestions on a fix just now :[
> problem: auto generated files, such as config.status and the libtool
> script, are create with permisions
> -rw-rw-rw-, not
> -rwxrwxrwx.
> my
> CYGWIN=$'ntsec binmode'
> Background: I'm looking into why libtool is currently broken, and one of
> the problems is that the libtool script is created without execute
> permissions.
> My suspicion is that the files are checked by cygwin for #!/bin/foo at
> create time, (which will fail as len==0), set to rw-rw-rw-. IMO the
> correct behaviour should be to set the x bit on all files when they are
> created, as long as it would be inherited from the directory above (I've
> included a ls -al for reference), and not touch the x bit unless a
> userland program calls chmod.

No, that's not correct. Files are created using the permission
bits used in the applications call to creat(2) or open(2), just
modified by the current umask. It's not the responsibility of
Cygwin to change modes and it will not do it. That has nothing to
do with ntsec and as long as ntsec is switched on, the permissions
are only generated as it's usual on POSIX systems. There's no
code which checks for the content in any way to change the
permissions on create time.

Did you look into libtool if the script is actually created using
x-bits or if a chmod is called on the file which perhaps fails?


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

More information about the Cygwin mailing list