From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: owner@emacsbugs.donarmstrong.com (Emacs bug Tracking System) Newsgroups: gmane.emacs.bugs Subject: bug#3328: marked as done (set-default-file-modes on Windows Emacs broken) Date: Tue, 19 May 2009 19:45:06 +0000 Message-ID: References: <83iqjwq3w9.fsf@gnu.org> <4A11C783.2040206@yahoo.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----------=_1242762306-668-0" X-Trace: ger.gmane.org 1242762744 30516 80.91.229.12 (19 May 2009 19:52:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 19 May 2009 19:52:24 +0000 (UTC) To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue May 19 21:52:14 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1M6VMD-0001sM-VS for geb-bug-gnu-emacs@m.gmane.org; Tue, 19 May 2009 21:52:14 +0200 Original-Received: from localhost ([127.0.0.1]:44892 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M6VMD-0006yo-9t for geb-bug-gnu-emacs@m.gmane.org; Tue, 19 May 2009 15:52:13 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M6VM7-0006xh-T7 for bug-gnu-emacs@gnu.org; Tue, 19 May 2009 15:52:07 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M6VM3-0006wF-ST for bug-gnu-emacs@gnu.org; Tue, 19 May 2009 15:52:07 -0400 Original-Received: from [199.232.76.173] (port=48398 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M6VM3-0006w8-HP for bug-gnu-emacs@gnu.org; Tue, 19 May 2009 15:52:03 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:40938) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1M6VLz-0007SN-Qq; Tue, 19 May 2009 15:52:00 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n4JJpvuK003422; Tue, 19 May 2009 12:51:57 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id n4JJj6SE000734; Tue, 19 May 2009 12:45:06 -0700 X-Mailer: MIME-tools 5.420 (Entity 5.420) X-Loop: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: closed 3328 X-Emacs-PR-Package: emacs X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:28032 Archived-At: This is a multi-part message in MIME format... ------------=_1242762306-668-0 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Your message dated Tue, 19 May 2009 22:38:46 +0300 with message-id <83iqjwq3w9.fsf@gnu.org> and subject line Re: bug#3328: set-default-file-modes on Windows Emacs brok= en has caused the Emacs bug report #3328, regarding set-default-file-modes on Windows Emacs broken to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner@emacsbugs.donarmstrong.com immediately.) --=20 3328: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=3D3328 Emacs Bug Tracking System Contact owner@emacsbugs.donarmstrong.com with problems ------------=_1242762306-668-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by emacsbugs.donarmstrong.com; 18 May 2009 20:39:43 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: * X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=1.3 required=4.0 tests=IMPRONONCABLE_1, MURPHY_WRONG_WORD1,MURPHY_WRONG_WORD2 autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n4IKddCs018370 for ; Mon, 18 May 2009 13:39:41 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M69cZ-0002hF-CA for bug-gnu-emacs@gnu.org; Mon, 18 May 2009 16:39:39 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M69cY-0002gU-OG for bug-gnu-emacs@gnu.org; Mon, 18 May 2009 16:39:38 -0400 Received: from [199.232.76.173] (port=57128 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M69cY-0002gG-Dm for bug-gnu-emacs@gnu.org; Mon, 18 May 2009 16:39:38 -0400 Received: from smtp105.prem.mail.ac4.yahoo.com ([76.13.13.44]:20248) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1M69cY-00062Y-2Q for bug-gnu-emacs@gnu.org; Mon, 18 May 2009 16:39:38 -0400 Received: (qmail 4732 invoked from network); 18 May 2009 20:39:37 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:X-Yahoo-SMTP:X-YMail-OSG:X-Yahoo-Newman-Property:Message-ID:Date:From:User-Agent:MIME-Version:To:Subject:Content-Type:Content-Transfer-Encoding; b=1ddK1yfKfLimY3qQq5RkLQqXldzg7yAGpHqZQlKLBcic/3yALGDb3g7uyBkyrYywQAOybUqY/bJEcE4E29gmqaHHE8pyFoQBuUqQIoKYqX/LsbDTWyoWIbK8VLCkqucvciyBiJnBNGlsmy7C50e/JOPOou8tgs9/GVPdCAp5UcA= ; Received: from portale-x.east.saic.com (r_q_einstein-emacsbugreport@198.151.13.15 with plain) by smtp105.prem.mail.ac4.yahoo.com with SMTP; 18 May 2009 13:39:37 -0700 PDT X-Yahoo-SMTP: dMJxo3KswBAfXpqmkp1vZEFWzZuPaCp4D0o- X-YMail-OSG: Lvw3s44VM1n0ESCa4CfclqgZ_ziGD_GaZ56Url4b.M3dXqm_zA2gScIqWUoSwyrcDaFhBR.qN0oV6KAE_2AvBfwfrBMy8vYF6qgGGQyRiOzhuDGGF5SHhyrsNdvvIckEwUMK009hNBzblykE0gZcJL1Q0L2rIaCOopDF3uj30B3sEIjct85G_Nlaw3Vn5kF70t.x9R_wuxeTGffVcybQrFYjSSegAFtDuPQGuI.qSaQnc9UOOptcXqVdzy7LFOtY6Wze9VnGn4ibL4Q1x9qIlg-- X-Yahoo-Newman-Property: ymail-3 Message-ID: <4A11C783.2040206@yahoo.com> Date: Mon, 18 May 2009 16:39:31 -0400 From: Matthew Carter User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: bug-gnu-emacs@gnu.org Subject: set-default-file-modes on Windows Emacs broken Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-detected-operating-system: by monty-python.gnu.org: FreeBSD 4.7-5.2 (or MacOS X 10.2-10.4) (2) * The version number of Emacs. GNU Emacs 22.2.1 (i386-mingw-nt5.1.2600) of 2008-03-26 on RELEASE * The operands given to the configure command when Emacs was installed. I installed this version of Windows emacs as a binary installation downloaded from the web, so I never ran a "configure" command. * A complete list of any modifications you have made to the Emacs source. None. * Details of any other deviations from the standard procedure for installing GNU Emacs. None. * The precise commands we need to type to reproduce the bug. Run this lisp expression: (set-default-file-modes ?\644) e.g., by putting it in your ~/.emacs or by using M-: Then, create a new file, "foo.txt". Then, in a cygwin bash shell, run "ls -l foo.txt". The file SHOULD have these permissions: -rw-r--r-- But instead, it has these permissions: -rwxrwxrwx I tried passing various values to set-default-file-modes to see whether it had any effect at all. It did, but not the expected effect. Here are the results I found: The first column tells the value that I passed in to set-default-file-modes . The second column tells what value the default-file-modes function returned as a result. The third column shows the actual permissions that a created file had (as shown by cygwin "ls -l"). (All values are shown in octal.) set-default-file-modes default-file-modes file permissions ---------------------- ------------------ ---------------- 01 0177 0555 0700 0777 0755 0777 0777 0755 0 0177 0555 0400 0577 0555 040 0177 0555 ------------=_1242762306-668-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 3328-done) by emacsbugs.donarmstrong.com; 19 May 2009 19:39:02 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.9 required=4.0 tests=AWL,FOURLA,HAS_BUG_NUMBER, IMPRONONCABLE_1,MURPHY_WRONG_WORD1,MURPHY_WRONG_WORD2 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mtaout6.012.net.il (mtaout6.012.net.il [84.95.2.16]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n4JJcwTK031360 for <3328-done@emacsbugs.donarmstrong.com>; Tue, 19 May 2009 12:38:59 -0700 Received: from conversion-daemon.i-mtaout6.012.net.il by i-mtaout6.012.net.il (HyperSendmail v2007.08) id <0KJW00600P58U000@i-mtaout6.012.net.il> for 3328-done@emacsbugs.donarmstrong.com; Tue, 19 May 2009 22:38:51 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.228.115.215]) by i-mtaout6.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0KJW005CNP8L5W10@i-mtaout6.012.net.il>; Tue, 19 May 2009 22:38:49 +0300 (IDT) Date: Tue, 19 May 2009 22:38:46 +0300 From: Eli Zaretskii Subject: Re: bug#3328: set-default-file-modes on Windows Emacs broken In-reply-to: <4A11C783.2040206@yahoo.com> X-012-Sender: halo1@inter.net.il To: Matthew Carter , 3328-done@emacsbugs.donarmstrong.com Reply-to: Eli Zaretskii Message-id: <83iqjwq3w9.fsf@gnu.org> References: <4A11C783.2040206@yahoo.com> > Date: Mon, 18 May 2009 16:39:31 -0400 > From: Matthew Carter > Cc: > > Run this lisp expression: > (set-default-file-modes ?\644) > e.g., by putting it in your ~/.emacs or by using M-: > > Then, create a new file, "foo.txt". > Then, in a cygwin bash shell, run "ls -l foo.txt". > The file SHOULD have these permissions: > -rw-r--r-- > But instead, it has these permissions: > -rwxrwxrwx This is not a bug. Maybe a missing feature (which is not easy to implement). Details follow. First, the way native Windows programs (such as Emacs) implement Unix-style permission mode bits, and the way Cygwin implements them, are very different. Native Windows applications only look at the first (most significant) 3 mode bits, and ignore the rest. Thus, 0644, 0664, and 0666 will all give the same effect: create a file that is readable and writable by the owner. If you use 0444, you will get a read-only file. And that is about all you can meaningfully get in the native Windows build of Emacs: the MS emulation of `umask' does not allow to create files that are not readable by the owner, and it can not set the executable (x) bit. This all is a consequence of a simple fact that the MS emulation of `umask' and related features use a single bit in the file's attributes: the readonly bit. Cygwin, OTOH, uses Windows NT security features to emulate the Posix permissions much closer. It almost completely ignores the readonly bit, and instead manipulates the Windows ACLs to emulate Posix permissions, including owner, group, and world permissions. So you are (a) expecting from NTEmacs more than it currently supports, and (b) use incompatible tools to assess the effect of operations on the file permission bits. Therefore, I'm closing this bug report. Thanks anyway for your detailed report. ------------=_1242762306-668-0--