From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#16133: 24.3; copy-file fails on chmod when copying to FAT filesystem Date: Sun, 29 Dec 2013 10:31:33 -0800 Organization: UCLA Computer Science Department Message-ID: <52C06A85.40300@cs.ucla.edu> References: <52B62BC3.4050508@cs.ucla.edu> <83ob498s3q.fsf@gnu.org> <52B66414.1090709@cs.ucla.edu> <87y53czxz5.fsf@wizzle.ran.pp.ru> <52B7377C.3070004@cs.ucla.edu> <8738lkhcen.fsf@wizzle.ran.pp.ru> <52B8CE25.9080803@cs.ucla.edu> <87lhzahh9w.fsf@wizzle.ran.pp.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1388341939 32099 80.91.229.3 (29 Dec 2013 18:32:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 29 Dec 2013 18:32:19 +0000 (UTC) Cc: 16133-done@debbugs.gnu.org To: Artem Chuprina Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Dec 29 19:32:24 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VxL9z-0000Wn-GN for geb-bug-gnu-emacs@m.gmane.org; Sun, 29 Dec 2013 19:32:23 +0100 Original-Received: from localhost ([::1]:55987 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VxL9y-00079A-Vy for geb-bug-gnu-emacs@m.gmane.org; Sun, 29 Dec 2013 13:32:22 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39404) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VxL9o-00078v-Kz for bug-gnu-emacs@gnu.org; Sun, 29 Dec 2013 13:32:19 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VxL9g-0003HU-02 for bug-gnu-emacs@gnu.org; Sun, 29 Dec 2013 13:32:12 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:36545) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VxL9f-0003HE-T2 for bug-gnu-emacs@gnu.org; Sun, 29 Dec 2013 13:32:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VxL9f-0001b4-A4 for bug-gnu-emacs@gnu.org; Sun, 29 Dec 2013 13:32:03 -0500 Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sun, 29 Dec 2013 18:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 16133 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed patch Mail-Followup-To: 16133@debbugs.gnu.org, eggert@cs.ucla.edu, ran@lasgalen.net Original-Received: via spool by 16133-done@debbugs.gnu.org id=D16133.13883418976088 (code D ref 16133); Sun, 29 Dec 2013 18:32:02 +0000 Original-Received: (at 16133-done) by debbugs.gnu.org; 29 Dec 2013 18:31:37 +0000 Original-Received: from localhost ([127.0.0.1]:50562 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VxL9E-0001a6-B7 for submit@debbugs.gnu.org; Sun, 29 Dec 2013 13:31:36 -0500 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]:57295) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VxL9C-0001Zx-Mi for 16133-done@debbugs.gnu.org; Sun, 29 Dec 2013 13:31:35 -0500 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 18F92A60003; Sun, 29 Dec 2013 10:31:34 -0800 (PST) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Original-Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mrCgZxWG0g0o; Sun, 29 Dec 2013 10:31:33 -0800 (PST) Original-Received: from [192.168.1.9] (pool-108-0-233-62.lsanca.fios.verizon.net [108.0.233.62]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 9F4EEA60002; Sun, 29 Dec 2013 10:31:33 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 In-Reply-To: <87lhzahh9w.fsf@wizzle.ran.pp.ru> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:82710 Archived-At: 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.