From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: jari Newsgroups: gmane.emacs.bugs Subject: bug#10257: 23.3.1 Cygwin: network drives - file is write protected (false positive) Date: Tue, 13 Dec 2011 18:26:28 +0200 Message-ID: <20111213162628.GB22678@picasso.cante.net> References: <87aa71mwng.fsf@picasso.cante.net> <4EE270AA.2080702@cornell.edu> <20111210095858.GA19881@cante.cante.net> <4EE742B0.1080703@cornell.edu> <20111213140042.GA22678@picasso.cante.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1323793627 29016 80.91.229.12 (13 Dec 2011 16:27:07 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 13 Dec 2011 16:27:07 +0000 (UTC) Cc: 10257@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Dec 13 17:27:02 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RaVBx-00045l-Vx for geb-bug-gnu-emacs@m.gmane.org; Tue, 13 Dec 2011 17:26:58 +0100 Original-Received: from localhost ([::1]:55140 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RaVBx-0002dy-Ey for geb-bug-gnu-emacs@m.gmane.org; Tue, 13 Dec 2011 11:26:57 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:36718) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RaVBp-0002bX-IB for bug-gnu-emacs@gnu.org; Tue, 13 Dec 2011 11:26:55 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RaVBj-000241-Pz for bug-gnu-emacs@gnu.org; Tue, 13 Dec 2011 11:26:49 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35868) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RaVBj-00023u-OO for bug-gnu-emacs@gnu.org; Tue, 13 Dec 2011 11:26:43 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1RaVCz-0007Xn-MY for bug-gnu-emacs@gnu.org; Tue, 13 Dec 2011 11:28:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: jari Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 13 Dec 2011 16:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10257 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 10257-submit@debbugs.gnu.org id=B10257.132379367828990 (code B ref 10257); Tue, 13 Dec 2011 16:28:01 +0000 Original-Received: (at 10257) by debbugs.gnu.org; 13 Dec 2011 16:27:58 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RaVCw-0007XX-0m for submit@debbugs.gnu.org; Tue, 13 Dec 2011 11:27:58 -0500 Original-Received: from emh07.mail.saunalahti.fi ([62.142.5.117]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RaVCs-0007XL-VB for 10257@debbugs.gnu.org; Tue, 13 Dec 2011 11:27:56 -0500 Original-Received: from saunalahti-vams (vs3-10.mail.saunalahti.fi [62.142.5.94]) by emh07-2.mail.saunalahti.fi (Postfix) with SMTP id 8A86C18D1CA; Tue, 13 Dec 2011 18:26:34 +0200 (EET) Original-Received: from emh07.mail.saunalahti.fi ([62.142.5.117]) by vs3-10.mail.saunalahti.fi ([62.142.5.94]) with SMTP (gateway) id A0289686FF5; Tue, 13 Dec 2011 18:26:34 +0200 Original-Received: from picasso.cante.net (a91-155-176-245.elisa-laajakaista.fi [91.155.176.245]) by emh07.mail.saunalahti.fi (Postfix) with ESMTP id 09B3C1C6386; Tue, 13 Dec 2011 18:26:29 +0200 (EET) Original-Received: from jaalto by picasso.cante.net with local (Exim 4.77) (envelope-from ) id 1RaVBU-0002k8-ML; Tue, 13 Dec 2011 18:26:28 +0200 Content-Disposition: inline In-Reply-To: X-Gpg-Key-Id: 0xD189E680 X-Gpg-Key-Info: http://key-server.de:11371/pks/lookup?search=0xD189E680&op=vindex X-Gpg-Key-Get: ttp://key-server.de:11371/pks/lookup?search=0xD189E680&op=get User-Agent: Mutt/1.5.21 (2010-09-15) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: jaalto@picasso.cante.net X-SA-Exim-Scanned: No (on picasso.cante.net); SAEximRunCond expanded to false X-Antivirus: VAMS X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Tue, 13 Dec 2011 11:28:01 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:54922 Archived-At: On 2011-12-13 09:43, Eli Zaretskii wrote: | > | So why don't you ask on the Cygwin list whether access() and | > | euidaccess() can be taught to give the "right" answer for files on | > | such drives. Or maybe the question is simply whether Cygwin can be | > | taught to determine the correct UID. | > | > Sure, but because The network drive is not part of Windows Domain, I'm | > afraid Cygwin has any means to determine what the correct UID or GID | > would be are as they have no correspondence on the Windows side. | | ??? As long as the network drive is mounted using Windows APIs (which | must be the case), the NT security features should be fully supported | for it. That includes the user and group IDs of every file. So why | does Cygwin's `stat' return 4294967295 (which AFAIU is a fancy way of | saying -1) for UID and GID of these files? Response from Cygwin list: > $ ls -la /cygdrive/z/tmp/test-epackage.el > -rwxr--r-- 1 ???????? ???????? 437 Dec 9 20:02 /cygdrive/z/tmp/test-epackage.el It's not a bug. If you use winbind and the user accounts are correctly mapped to Windows accounts, then you would see the Cygwin UIDs/GIDs correspoding to the SID of the AD user account. If you don't do that, there's only an invisible mapping from the Windows SID to the Unix uid/gid. The actual UNIX account has not the same mapping back to the Windows SID. Instead, the SID returned from Samba to Windows is a fake SID S-1-22-1-UnixUID or S-1-22-2-UnixGID. (..) The rest goes into details for setting 1:1 UID, GID mapping. Still, - The mapped drive can be written to without any extra 1:1 GUID,UID configuration. - Under Cygwin, should Emacs rely on unreliable[*] UID, GID? - Is there need for this extra prompt? The protective nature turned into nightmare. Much better would be to give control back to the user: (setq write-file-interactive-confirmation-flag nil) This doesn't affect Emacs's ability to signal an error on write failure. Jari [*] Which depend on specific environment and settings user has. The 1:1 setting gets interesting for N servers that may have different UID, GID settings for the same user names; as they may not all be part of the same domain.