From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: mismatch between what Emacs considers read-only and file permissions Date: Wed, 04 Feb 2015 21:04:17 +0200 Message-ID: <83r3u5fqha.fsf@gnu.org> References: NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1423076685 22214 80.91.229.3 (4 Feb 2015 19:04:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 4 Feb 2015 19:04:45 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Feb 04 20:04:44 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YJ5Fh-0007EK-No for geh-help-gnu-emacs@m.gmane.org; Wed, 04 Feb 2015 20:04:41 +0100 Original-Received: from localhost ([::1]:38183 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJ5Fh-0006Sr-5v for geh-help-gnu-emacs@m.gmane.org; Wed, 04 Feb 2015 14:04:41 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37995) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJ5FV-0006Sa-4Z for help-gnu-emacs@gnu.org; Wed, 04 Feb 2015 14:04:30 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YJ5FR-0001Os-Ve for help-gnu-emacs@gnu.org; Wed, 04 Feb 2015 14:04:29 -0500 Original-Received: from mtaout29.012.net.il ([80.179.55.185]:58890) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJ5FR-0001Om-Nr for help-gnu-emacs@gnu.org; Wed, 04 Feb 2015 14:04:25 -0500 Original-Received: from conversion-daemon.mtaout29.012.net.il by mtaout29.012.net.il (HyperSendmail v2007.08) id <0NJ900G00GPKFE00@mtaout29.012.net.il> for help-gnu-emacs@gnu.org; Wed, 04 Feb 2015 21:00:42 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout29.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NJ9006TNGT67S90@mtaout29.012.net.il> for help-gnu-emacs@gnu.org; Wed, 04 Feb 2015 21:00:42 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.185 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:102480 Archived-At: > From: Will Parsons > Date: 4 Feb 2015 17:12:52 GMT > > How does Emacs determine whether to mark a buffer read-only when > visiting a file that is writable? By looking at the file permission bits. > 1) Under Windows > > I make heavy use of the Cygwin environment under Windows, but usually > use the native Windows Emacs. I've never bothered to track down the > exact circumstances, but assume that Cygwin is setting file > permissions in a way that confuses native Emacs. Cygwin attempts to emulate Posix user/group/other permission bits by manipulating Windows NT security attributes. The way it does that will only work as you'd expect when those attributes are tested by Cygwin programs. Native Windows build of Emacs, OTOH, not only doesn't support the Cygwin fiddling with the NTSec features, it doesn't even look at those attributes when it checks files for accessibility; instead, it probes only the read-only bit (which is not affected by NTSec). My advice is not to mix Cygwin programs with native Emacs on Windows. Good native ports of Unix and GNU software to Windows are available, and you are advised to use them instead, if you don't want to deal with these incompatibilities.