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 16:00:42 +0200 Message-ID: <20111213140042.GA22678@picasso.cante.net> References: <87aa71mwng.fsf@picasso.cante.net> <4EE270AA.2080702@cornell.edu> <20111210095858.GA19881@cante.cante.net> <4EE742B0.1080703@cornell.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1323784929 26670 80.91.229.12 (13 Dec 2011 14:02:09 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 13 Dec 2011 14:02:09 +0000 (UTC) Cc: 10257@debbugs.gnu.org To: Ken Brown Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Dec 13 15:02:05 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 1RaSvi-0003aL-0R for geb-bug-gnu-emacs@m.gmane.org; Tue, 13 Dec 2011 15:02:02 +0100 Original-Received: from localhost ([::1]:33511 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RaSvh-0008Cz-Ks for geb-bug-gnu-emacs@m.gmane.org; Tue, 13 Dec 2011 09:02:01 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:57941) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RaSvW-0008Cb-5K for bug-gnu-emacs@gnu.org; Tue, 13 Dec 2011 09:01:59 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RaSvQ-0005YY-Cs for bug-gnu-emacs@gnu.org; Tue, 13 Dec 2011 09:01:50 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35458) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RaSvQ-0005YU-9F for bug-gnu-emacs@gnu.org; Tue, 13 Dec 2011 09:01:44 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1RaSwg-0003O1-1F for bug-gnu-emacs@gnu.org; Tue, 13 Dec 2011 09:03:02 -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 14:03: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.132378492812949 (code B ref 10257); Tue, 13 Dec 2011 14:03:01 +0000 Original-Received: (at 10257) by debbugs.gnu.org; 13 Dec 2011 14:02:08 +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 1RaSvo-0003Mo-MC for submit@debbugs.gnu.org; Tue, 13 Dec 2011 09:02:08 -0500 Original-Received: from emh02.mail.saunalahti.fi ([62.142.5.108]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RaSvl-0003Mf-B8 for 10257@debbugs.gnu.org; Tue, 13 Dec 2011 09:02:07 -0500 Original-Received: from saunalahti-vams (vs3-11.mail.saunalahti.fi [62.142.5.95]) by emh02-2.mail.saunalahti.fi (Postfix) with SMTP id C633BEF751; Tue, 13 Dec 2011 16:00:45 +0200 (EET) Original-Received: from emh04.mail.saunalahti.fi ([62.142.5.110]) by vs3-11.mail.saunalahti.fi ([62.142.5.95]) with SMTP (gateway) id A05F9CC119A; Tue, 13 Dec 2011 16:00:45 +0200 Original-Received: from picasso.cante.net (a91-155-176-245.elisa-laajakaista.fi [91.155.176.245]) by emh04.mail.saunalahti.fi (Postfix) with ESMTP id BCC8D41BE4; Tue, 13 Dec 2011 16:00:42 +0200 (EET) Original-Received: from jaalto by picasso.cante.net with local (Exim 4.77) (envelope-from ) id 1RaSuQ-0002Sp-C4; Tue, 13 Dec 2011 16:00:42 +0200 Content-Disposition: inline In-Reply-To: <4EE742B0.1080703@cornell.edu> 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 09:03:02 -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:54915 Archived-At: On 2011-12-13 07:18, Ken Brown wrote: | On 12/10/2011 4:58 AM, jaalto wrote: | >On 2011-12-09 15:33, Ken Brown wrote: | >| | >|>Here is an example under Cygwin Emacs: | >|> | >|> (file-attributes "/cygdrive/z/tmp/test-epackage.el") | >|> => (nil 1 4294967295.0 4294967295.0 (20194 11100) (20194 19792) (20194 | >|> 19792) 437 "-rwxr--r--" t (-1735557 1952988 . 8890) (30147 . 13405)) | >|> | >|>Under Cygwin Bash shell it looks like this: | >|> | >|> $ ls -la /cygdrive/z/tmp/test-epackage.el | >|> -rwxr--r-- 1 ???????? ???????? 437 Dec 9 20:02 /cygdrive/z/tmp/test-epackage.el | >|> | >| | >| Is there really a problem on *any* network drive, or is the issue | >| that you have some particular file system on that drive for which | >| Cygwin can't get reliable permission information? | > | >See above. The permissions from Cygwin shell look correct. It's the | >UID, GID that don't translate back to windows, because this not a domain. > | emacs uses file-writable-p, which calls check_writable() (defined in | fileio.c), which calls euidaccess(). That explains why emacs thinks | the file is not writable when Cygwin can't determine the UID. It | would certainly be possible to make check_writable() use a different | method of determining writability on Cygwin, as it already does on | MSDOS. But I still think it would be best to try to fix this in | Cygwin first. | | >The Disk drive has been mapped with Standard Windows "Map network | >drive" feature. | | 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. In any case, this is a big problem in daily use; especially because the file system check cannot be ignored, bypassed or configured to "just to go ahead and write without questions". Jari