This is the mail archive of the cygwin 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: Executable flag


On Wed, 26 Oct 2005, Brian Dessent wrote:

> 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
> permission.
>
> 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.)

I've used the attached script successfully for quite a while...
Enjoy,
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

If there's any real truth it's that the entire multidimensional infinity
of the Universe is almost certainly being run by a bunch of maniacs. /DA

Attachment: fixexec
Description: Text document

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

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