GNU bug report logs - #22795
25.0.91; Can't write read only file on w32

Previous Next

Package: emacs;

Reported by: "Ota, Takaaki" <Takaaki.Ota <at> am.sony.com>

Date: Wed, 24 Feb 2016 18:18:02 UTC

Severity: normal

Tags: moreinfo

Found in version 25.0.91

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #96 received at 22795 <at> debbugs.gnu.org (full text, mbox):

From: "Ota, Takaaki" <Takaaki.Ota <at> am.sony.com>
To: <eliz <at> gnu.org>
Cc: 22795 <at> debbugs.gnu.org
Subject: Re: bug#22795: 25.0.91; Can't write read only file on w32
Date: Mon, 6 Jun 2016 13:46:32 -0700
Mon, 6 Jun 2016 22:10:29 +0300: Eli Zaretskii <eliz <at> gnu.org> wrote:

> > Date: Mon, 6 Jun 2016 09:24:23 -0700
> > CC: <22795 <at> debbugs.gnu.org>
> > From: "Ota, Takaaki" <Takaaki.Ota <at> am.sony.com>
> > 
> > After opening a read only file, execute read-only-mode, modify the
> > file and try to save the file under emacs 25.0.94 on Linux and Windows
> > file-ownership-preserved-p returns non nil value on Linux and nil on
> > Windows.
> 
> What does (file-attributes FILENAME 'integer) return for that file?
> And what does (user-uid) return?

On Linux

(file-attributes "~/memo" 'integer)
(nil 1 1000 1000 (22351 8780 403703 908000) (22351 6556 219830 864000) (22351 6556 223830 864000) 1827 "-r--r--r--" t 131312 2049)
(user-uid)
1000

On Windows (both 24.5 and 25.0.94)

(file-attributes "~/memo" 'integer)
(nil 1 544 513 (21821 905 0 0) (22357 41339 0 0) (20624 9296 0 0) 289738 "-r--r--r--" t (1024 1 . 32777) (50396 . 34426))
(user-uid)
1001

> 
> > But I spoke too early about this.  After this, I then compared emacs
> > 25.0.94 and 24.5 on Windows.  On both version
> > file-ownership-preserved-p returns nil while save succeeds on 24.5 and
> > 25.0.94 fails with "Opening output file: Permission denined," error.
> > 
> > So file-ownership-preserved-p is not the root cause.  I still need to
> > continue to chase.
> 
> OK, thanks for the update.
> 




This bug report was last modified 8 years and 164 days ago.

Previous Next


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