delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2016/12/13/05:39:56

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:from:to:mime-version
:content-transfer-encoding:content-type:date:subject; q=dns; s=
default; b=jbTB2/dmQdFpqD9PETFkuxvmoXafP+smaZowKctIpnlmi3RF3bn2x
iF4rULLpdRo8RNg84SpySkkD0QjCWNQD33T3lRJufxrG/q/jzM5NaKGixJkqnHcB
qt8Dv8XvObhx2K7i0XOKxQxMBDgHS9V3KnMhd0JqmcGNGu9Ck2Tldg=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:from:to:mime-version
:content-transfer-encoding:content-type:date:subject; s=default;
bh=a7Zey82/J6QdSDG2PtfWQbubIvw=; b=n9T2jEHuihrxAm8k+nU6w1RPuMxr
s8eRHGbx9LOmsooClj9C1GXBpmBuAan7io8Jqet3rhRCVfUZu5jR0i1qO5R+EefS
PU4igMfTXbGwj4n85hSkYW+SWDMUsER5IyEi+I13Qnw0bsxrElcG1jh4SYJMLyHk
OP5rT6ycdhEE8lA=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-0.3 required=5.0 tests=AWL,BAYES_40,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=ronald, editors, Ronald, UD:st
X-HELO: out4-smtp.messagingengine.com
X-ME-Sender: <xms:3s9PWO-gOvgpVIlG7PtPRHnFOYD-uqke60JvUCnu53nr62prODAUAA>
Message-Id: <1481625566.176738.817340945.718D9CF0@webmail.messagingengine.com>
From: Ronald Fischer <ynnor AT mm DOT st>
To: cygwin AT cygwin DOT com
MIME-Version: 1.0
Date: Tue, 13 Dec 2016 11:39:26 +0100
Subject: Editors set x-bit (sometimes)
X-IsSubscribed: yes

Does anybody have an explanation for the following strange phenomenon?

When I create Ruby files (*.rb) with an, the files end up with the x-bit
set with some editors, while this does not happen with some other
editors. This is annoying, because when I use git to put the file in a
repository, and the repository is later read on Linux, the incorrect
x-bit is applied there too. The text editors where this happens, do so
consistently, as long as the file is below my Ruby HOME directory. It
does not happen, if I store the file outside my $HOME, say in c:\tmp. 

Since a few editors do not show this behaviour, one might blame the way
the editor creates the file. However, these text editors were not
written with a Cygwin environment in mind, and Windows doesn't have the
concept of an "executable bit", and it happens only if I create files
below my Cygwin Home, so I think this happens when Cygwin tries to
"infer" the x-bit from some other file properties.

I am aware that Cygwin has a policy to infer, whether the x-bit should
be set or not set. Nevertheless, this does not apply in my case:

- The files don't have a #! line
- I don't have a file association on Windows which would mark a .rb file
as being run by Ruby
- My file system is ntfs

BTW, my CYGWIN environment variable is set to just 'nodosfilewarning'.
I'm using Windows 7 and the 64-bit-version of Cygwin.

- Ronald



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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019