Executable flag

Brian Dessent brian@dessent.net
Wed Oct 26 22:11:00 GMT 2005

David Rasmussen wrote:

> Open cygwin. Write 'notepad test.txt'. Notepad opens, write something
> and then save the file. Now do an ll. The file test.txt has been created
> and has the executable flag set. I want it to not be set in such cases.

This is really out of Cygwin's control.  The permissions that other
programs choose to create files with is completely up to them.  It just
happens that the Windows default (Full Control to the owner and
Administrators, Read & Execute to Users) happens to contain the execute

However I believe that almost all Windows programs do not specify an ACL
when creating files, so they end up inheriting the permissions from the
directory (or from the parent directory or its parent directory, etc.)

If you change this ACL that is the source of this inheritance so that it
does not contain the 'execute' permission you should be able to get the
situation you desire.  However, you may break some functionality in
Windows.  For example, you will not be able to run any programs in such
a modified directory tree until you explicitly give all the .dll, .exe,
.ocx, etc files the Execute permission.  (It would be the same as if you
did "chmod -R 644 /bin" on a unix system.) 


Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

More information about the Cygwin mailing list