Subject: bug#37884: 27.0.50; Cannot write to a file in VirtualBox shared directory

From: Paul Eggert <[email-masked]>
Date: Thu, 31 Oct 2019 14:24:18 -0700

On 10/31/19 12:38 AM, Robert Pluim wrote:
> I thought there
> was a strong desire to keep the file read-only, otherwise why bother
> with the fchmod in the first place?

The desire was quite weak, not strong. I put in that fchmod in commit 
2013-03-05T22:35:[email-masked] only because mkostemp creates the 
lock file with mode 0600 but we want the file world-readable and so 
Emacs must OR 0044 into the mode. At the time, I thought there was no 
reason to have the file be writable to anybody once written, so I 
fchmod'ed it to 0444. But Bug#37884 means the file should be 
user-writable (to work around the compatibility issue with the 
nonstandard filesystem), so fchmod'ing to 0644 is a better choice.