bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#16133: 24.3; copy-file fails on chmod when copying to FAT filesystem


From: Paul Eggert
Subject: bug#16133: 24.3; copy-file fails on chmod when copying to FAT filesystem
Date: Sun, 29 Dec 2013 10:31:33 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

Artem Chuprina wrote:
  PE> I expect this setup will cause problems with other applications,
  PE> not just Emacs.  GNU tar would be one example.

You are wrong again.

Well, as Andreas mentioned, I was right about cp, so the
"again" in your remark is incorrect; but you are correct about
'tar'; it uses a trick in which it sets the umask to 0 to
avoid the need for fchmod.

Still, many programs don't use that trick, and you'll run
into problems with these programs.  GNU cpio would be one
example; if you do something like "find . -print | cpio -pdmuv .../dest",
where "dest" is in that file system, cpio will report an error
because it can't change the permission of the file that it creates.

In reviewing the email in this bug report it appears that we do
have a real problem here, and that a "real" solution will probably
require redesigning the API significantly so that there's a
copy-file variant that doesn't throw errors, or something like that.
Right now we're just trying to fix bugs, though, so I installed
the more-conservative change, where copy-file doesn't try to fchmod
an existing file -- this causes copy-file to act more like plain 'cp'
and I expect it's what more copy-file users would expect anyway.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]