This is the mail archive of the 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: Hello and cygwin quesiton

On Tue, 30 Sep 2003, Yap on ExactGeom wrote:

> Dear Igor,
> How are you?  I noticed that you are an active developer of cygwin.
> I really liked this platform and our Core Library is developed
> on this mainly.   I have a question:
> In my recent (June) installation of cygwin, there was an annoying
> bug -- many of the files that I create are automatically given
> the execute permission.  [Since my "ls" will automatically show
> me which files are executable, this is VERY annoying.]
> But this behavior is not universal.  If I have a non-executable
> file, and I exit it using gvim, the file will become executable.
> But using vim, it remains non-executable.  But I don't think
> the program is with a bad installation of gvim, because this
> phenomenon shows up in other places.
> Heard of this bug before?
> Thanks, Chee

Hi, Chee,

Great to hear from you.

I'm redirecting this reply to the general Cygwin list, mostly to get this
into the archives (because I know others are having this same problem).
Also, this brings your question up before a large body of expertise --
perhaps someone else will find something I've missed.

This is not a bug, but rather an artifact of the default permissions files
get when written by Windows programs.  Gvim is a pure Windows program, in
contrast with vim, which is a Cygwin one.  Also, vim writes files
in-place, whereas gvim creates a new copy -- hence the change in
permissions.  Unfortunately, there isn't anything you can easily do to fix
this.  I have a script (attached) that I run periodically on my system to
fix the executable permissions.  It's not foolproof, but it's better than
nothing (and it should err on the conservative side).
      |\      _,,,---,,_
ZZZzz /,`.-'`'    -.  ;-;;,_
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

Attachment: fixexec
Description: Text document

Unsubscribe info:
Problem reports:

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