GNU bug report logs - #3328
set-default-file-modes on Windows Emacs broken

Previous Next

Package: emacs;

Reported by: Matthew Carter <r_q_einstein-emacsbugreport <at> yahoo.com>

Date: Mon, 18 May 2009 20:45:03 UTC

Severity: normal

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Matthew Carter <r_q_einstein-emacsbugreport <at> yahoo.com>
To: bug-gnu-emacs <at> gnu.org
Subject: bug#3328: set-default-file-modes on Windows Emacs broken
Date: Mon, 18 May 2009 16:39:31 -0400
   * 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





This bug report was last modified 16 years and 3 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.