From unknown Sun Aug 17 22:03:31 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#21713 <21713@debbugs.gnu.org> To: bug#21713 <21713@debbugs.gnu.org> Subject: Status: On CIFS, mv behaves as mv -f Reply-To: bug#21713 <21713@debbugs.gnu.org> Date: Mon, 18 Aug 2025 05:03:31 +0000 retitle 21713 On CIFS, mv behaves as mv -f reassign 21713 coreutils submitter 21713 Sam Kuper severity 21713 normal tag 21713 notabug thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 19 11:35:10 2015 Received: (at submit) by debbugs.gnu.org; 19 Oct 2015 15:35:10 +0000 Received: from localhost ([127.0.0.1]:56899 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZoCSs-00029P-8N for submit@debbugs.gnu.org; Mon, 19 Oct 2015 11:35:10 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34698) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zo9sW-0006a4-FY for submit@debbugs.gnu.org; Mon, 19 Oct 2015 08:49:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zo9sV-0001Nb-0n for submit@debbugs.gnu.org; Mon, 19 Oct 2015 08:49:27 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:55957) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zo9sU-0001NW-UV for submit@debbugs.gnu.org; Mon, 19 Oct 2015 08:49:26 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44696) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zo9sT-0002l5-Fj for bug-coreutils@gnu.org; Mon, 19 Oct 2015 08:49:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zo9sS-0001N7-6W for bug-coreutils@gnu.org; Mon, 19 Oct 2015 08:49:25 -0400 Received: from mail-io0-x22e.google.com ([2607:f8b0:4001:c06::22e]:34457) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zo9sS-0001N3-0r for bug-coreutils@gnu.org; Mon, 19 Oct 2015 08:49:24 -0400 Received: by iow1 with SMTP id 1so187529558iow.1 for ; Mon, 19 Oct 2015 05:49:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=YW6BmkWdMhjQtI6LO2uffBobaOHh/g6KcZgPcGVXIHc=; b=KekQvrHXCBN6nWZw2ocBSReGecQZBda/BrkgCNgS262ialMfq175Z75X2V7MXdE9B1 h/mIBRPqo3UWy7CfP3E1EBbYxjLHunQ6HNOkGRn8+utwv4dC8BWHj3jcv0RHodO+FJm6 Yyp93zIR/d7eE5zvb6VWti1gbSS5ugwRyrPErQJpgLzpR8CfQiX5Gj74vO+Rg06zr4jM brrY4+y5UQiJUejaDtGbTuDJQxBQuSf/S1Mw1MD4UmWqzkUQ/RYUlqZ8jS8tNVT3n/sG gDVyHgO8BdpjFpmxD/6/+DxK8mUWg7eZzmyd8FtzqyPhL1c7wJSfk8EIkTlXwsAAq0s8 qGpg== MIME-Version: 1.0 X-Received: by 10.107.37.143 with SMTP id l137mr7018926iol.45.1445258963225; Mon, 19 Oct 2015 05:49:23 -0700 (PDT) Received: by 10.64.148.193 with HTTP; Mon, 19 Oct 2015 05:49:22 -0700 (PDT) Date: Mon, 19 Oct 2015 13:49:22 +0100 X-Google-Sender-Auth: YVNpmwQCCQ40rgP8lwv3mBOxLq4 Message-ID: Subject: On CIFS, mv behaves as mv -f From: Sam Kuper To: bug-coreutils@gnu.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Mon, 19 Oct 2015 11:35:08 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) On a system where `df -T` shows the file system to be "cifs" (presumably the Common Internet File System from Microsoft: https://technet.microsoft.com/en-us/library/cc939973.aspx ), running `mv` causes unexpected behaviour. Essentially, `mv` behaves as though `mv -f` had been used. Example, using GNU Coreutils 8.21 on Ubuntu 14.04.3 LTS: $ which mv /bin/mv $ ls -l total 0 $ echo foo > 1; chmod -w 1; cp 1 2; ls -l | cut -d' ' -f 1-5,9 -r-x------ 1 me me 4 1 -r-x------ 1 me me 4 2 $ echo bar > 2 -bash: 2: Permission denied $ mv 1 2 $ ls -l | cut -d' ' -f 1-5,9 -r-x------ 1 me me 4 2 I would have expected the `mv 1 2` command to have prompted the user before overwriting file 2. It would be helpful to the user if mv could be improved so that it behaves as expected, even on a "cifs" file system. For comparison, running the same commands on a machine with an ext4 file system and a recent version of Coreutils yielded: $ mv 1 2 mv: replace =E2=80=982=E2=80=99, overriding mode 0444 (r--r--r--)? as expected. N.B. I first mentioned this issue at http://unix.stackexchange.com/q/237123/6860 and am grateful for the helpful feedback from the people who commented there, which helped me identify the file system as the likely confounding factor. Thank you for maintaining Coreutils! Sam From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 19 11:52:08 2015 Received: (at 21713) by debbugs.gnu.org; 19 Oct 2015 15:52:08 +0000 Received: from localhost ([127.0.0.1]:56925 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZoCjI-0002Xj-1F for submit@debbugs.gnu.org; Mon, 19 Oct 2015 11:52:08 -0400 Received: from mail1.vodafone.ie ([213.233.128.43]:29005) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZoCjF-0002XZ-Vv for 21713@debbugs.gnu.org; Mon, 19 Oct 2015 11:52:06 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ag0bADcRJVZtT8uM/2dsb2JhbABUCiiCPFIfNW+CXLcShgkhhXoBAgKBOkwBAQEBAQGBC4QuAQEEIw8BVgkCDQsCAgUWCwICCQMCAQIBRQYBDAgBAYgwAQiTV503hW+MSQEBCAIBIIEihFqFeYQwZIJpgUUFhgWBNIcJh2GFGYokhwySbGOEBD00AYVmAQEB Received: from unknown (HELO localhost.localdomain) ([109.79.203.140]) by mail1.vodafone.ie with ESMTP; 19 Oct 2015 16:52:03 +0100 Subject: Re: bug#21713: On CIFS, mv behaves as mv -f To: Sam Kuper , 21713@debbugs.gnu.org References: From: =?UTF-8?Q?P=c3=a1draig_Brady?= Message-ID: <562511A3.8020903@draigBrady.com> Date: Mon, 19 Oct 2015 16:52:03 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 21713 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) On 19/10/15 13:49, Sam Kuper wrote: > On a system where `df -T` shows the file system to be "cifs" > (presumably the Common Internet File System from Microsoft: > https://technet.microsoft.com/en-us/library/cc939973.aspx ), running > `mv` causes unexpected behaviour. Essentially, `mv` behaves as though > `mv -f` had been used. > > Example, using GNU Coreutils 8.21 on Ubuntu 14.04.3 LTS: > > $ which mv > /bin/mv > $ ls -l > total 0 > $ echo foo > 1; chmod -w 1; cp 1 2; ls -l | cut -d' ' -f 1-5,9 > -r-x------ 1 me me 4 1 > -r-x------ 1 me me 4 2 > $ echo bar > 2 > -bash: 2: Permission denied > $ mv 1 2 > $ ls -l | cut -d' ' -f 1-5,9 > -r-x------ 1 me me 4 2 > > I would have expected the `mv 1 2` command to have prompted the user > before overwriting file 2. It would be helpful to the user if mv could > be improved so that it behaves as expected, even on a "cifs" file > system. > > For comparison, running the same commands on a machine with an ext4 > file system and a recent version of Coreutils yielded: > > $ mv 1 2 > mv: replace ‘2’, overriding mode 0444 (r--r--r--)? > > as expected. > > N.B. I first mentioned this issue at > http://unix.stackexchange.com/q/237123/6860 and am grateful for the > helpful feedback from the people who commented there, which helped me > identify the file system as the likely confounding factor. > > Thank you for maintaining Coreutils! I guess that's the write bits being ignored or mapped to another meaning on cifs? I.E. access(..., W_OK) is returning OK (0) for you? You can check this like: strace -e access mv 1 2 thanks, Pádraig From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 19 13:30:31 2015 Received: (at 21713) by debbugs.gnu.org; 19 Oct 2015 17:30:31 +0000 Received: from localhost ([127.0.0.1]:57013 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZoEGU-00080r-30 for submit@debbugs.gnu.org; Mon, 19 Oct 2015 13:30:30 -0400 Received: from mail-io0-f179.google.com ([209.85.223.179]:34656) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZoEGR-00080i-BY for 21713@debbugs.gnu.org; Mon, 19 Oct 2015 13:30:28 -0400 Received: by iow1 with SMTP id 1so202794236iow.1 for <21713@debbugs.gnu.org>; Mon, 19 Oct 2015 10:30:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=SJWlYiz8o4c9YVvrMGPuQmiJMLTOUJoI6/vj5/HuWs8=; b=j69d+eap5ozsbXHjUbSji7EPJgaqET4wMhl8KffrL1wjmhp/GuwJRBVgGR1aKVcjVT iODG5hhJ17yfEAEdNp14dkEHsFlDhL0tTT2Aod7a3IfiSfm/WebUZ0DsRp5fHh0UPvcn xLZrZRWUdLjl5yIgjpqFinT2qGXU8r48ymmEuAQIA2ZKVw4jTCXcu4cBVjRwfJCqEpiG xGHm4Bwu4KvQTFj19BTUN5IE7KWlHxx6ifGKJvkHmW3OmoVhg05vgsU8qQeZ+Mc4mOgh hWnbOYhqnkd0iwUM5Z4RrmzIgERKtn37GZq8Wsl4ZloGarOylyr0j2NDJUI9ZbYadeOt +Cdw== MIME-Version: 1.0 X-Received: by 10.107.156.14 with SMTP id f14mr33576821ioe.32.1445275826674; Mon, 19 Oct 2015 10:30:26 -0700 (PDT) Received: by 10.64.148.193 with HTTP; Mon, 19 Oct 2015 10:30:26 -0700 (PDT) In-Reply-To: <562511A3.8020903@draigBrady.com> References: <562511A3.8020903@draigBrady.com> Date: Mon, 19 Oct 2015 18:30:26 +0100 X-Google-Sender-Auth: 69omclzi2J_BlzcGJBTeKD9siPA Message-ID: Subject: Re: bug#21713: On CIFS, mv behaves as mv -f From: Sam Kuper To: =?UTF-8?Q?P=C3=A1draig_Brady?= Content-Type: multipart/mixed; boundary=001a1140c2dc41351a0522788042 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21713 Cc: 21713@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --001a1140c2dc41351a0522788042 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 19/10/2015, P=C3=A1draig Brady wrote: > On 19/10/15 13:49, Sam Kuper wrote: >> On a system where `df -T` shows the file system to be "cifs" >> (presumably the Common Internet File System from Microsoft: >> https://technet.microsoft.com/en-us/library/cc939973.aspx ), running >> `mv` causes unexpected behaviour. Essentially, `mv` behaves as though >> `mv -f` had been used. >> >> Example, using GNU Coreutils 8.21 on Ubuntu 14.04.3 LTS: >> >> $ which mv >> /bin/mv >> $ ls -l >> total 0 >> $ echo foo > 1; chmod -w 1; cp 1 2; ls -l | cut -d' ' -f 1-5,9 >> -r-x------ 1 me me 4 1 >> -r-x------ 1 me me 4 2 >> $ echo bar > 2 >> -bash: 2: Permission denied >> $ mv 1 2 >> $ ls -l | cut -d' ' -f 1-5,9 >> -r-x------ 1 me me 4 2 >> >> I would have expected the `mv 1 2` command to have prompted the user >> before overwriting file 2. It would be helpful to the user if mv could >> be improved so that it behaves as expected, even on a "cifs" file >> system. >> >> For comparison, running the same commands on a machine with an ext4 >> file system and a recent version of Coreutils yielded: >> >> $ mv 1 2 >> mv: replace =E2=80=982=E2=80=99, overriding mode 0444 (r--r--r--)? >> >> as expected. >> >> N.B. I first mentioned this issue at >> http://unix.stackexchange.com/q/237123/6860 and am grateful for the >> helpful feedback from the people who commented there, which helped me >> identify the file system as the likely confounding factor. >> >> Thank you for maintaining Coreutils! > > I guess that's the write bits being ignored or mapped to another meaning = on > cifs? > I.E. access(..., W_OK) is returning OK (0) for you? > You can check this like: strace -e access mv 1 2 BEGIN TEST $ ls -l total 0 $ echo foo > 1; chmod -w 1; cp 1 2; ls -l | cut -d' ' -f 1-5,9 -r-x------ 1 me me 4 1 -r-x------ 1 me me 4 2 $ strace -e access mv 1 2 access("/etc/ld.so.nohwcap", F_OK) =3D -1 ENOENT (No such file or dire= ctory) access("/etc/ld.so.preload", R_OK) =3D -1 ENOENT (No such file or dire= ctory) access("/etc/ld.so.nohwcap", F_OK) =3D -1 ENOENT (No such file or dire= ctory) access("/etc/ld.so.nohwcap", F_OK) =3D -1 ENOENT (No such file or dire= ctory) access("/etc/ld.so.nohwcap", F_OK) =3D -1 ENOENT (No such file or dire= ctory) access("/etc/ld.so.nohwcap", F_OK) =3D -1 ENOENT (No such file or dire= ctory) access("/etc/ld.so.nohwcap", F_OK) =3D -1 ENOENT (No such file or dire= ctory) access("/etc/ld.so.nohwcap", F_OK) =3D -1 ENOENT (No such file or dire= ctory) access("2", W_OK) =3D 0 +++ exited with 0 +++ END TEST In case the test above hasn't reproduced clearly, due to line-wrapping of my email, etc, I have attached it as a text file. Thanks again, Sam --001a1140c2dc41351a0522788042 Content-Type: text/plain; charset=US-ASCII; name="strace_mv_test.txt" Content-Disposition: attachment; filename="strace_mv_test.txt" Content-Transfer-Encoding: base64 X-Attachment-Id: file2 JCBscyAtbAp0b3RhbCAwCiQgZWNobyBmb28gPiAxOyBjaG1vZCAtdyAxOyBjcCAxIDI7IGxzIC1s IHwgY3V0IC1kJyAnIC1mIDEtNSw5Ci1yLXgtLS0tLS0gMSBtZSBtZSA0IDEKLXIteC0tLS0tLSAx IG1lIG1lIDQgMgokIHN0cmFjZSAtZSBhY2Nlc3MgbXYgMSAyCmFjY2VzcygiL2V0Yy9sZC5zby5u b2h3Y2FwIiwgRl9PSykgICAgICA9IC0xIEVOT0VOVCAoTm8gc3VjaCBmaWxlIG9yIGRpcmVjdG9y eSkKYWNjZXNzKCIvZXRjL2xkLnNvLnByZWxvYWQiLCBSX09LKSAgICAgID0gLTEgRU5PRU5UIChO byBzdWNoIGZpbGUgb3IgZGlyZWN0b3J5KQphY2Nlc3MoIi9ldGMvbGQuc28ubm9od2NhcCIsIEZf T0spICAgICAgPSAtMSBFTk9FTlQgKE5vIHN1Y2ggZmlsZSBvciBkaXJlY3RvcnkpCmFjY2Vzcygi L2V0Yy9sZC5zby5ub2h3Y2FwIiwgRl9PSykgICAgICA9IC0xIEVOT0VOVCAoTm8gc3VjaCBmaWxl IG9yIGRpcmVjdG9yeSkKYWNjZXNzKCIvZXRjL2xkLnNvLm5vaHdjYXAiLCBGX09LKSAgICAgID0g LTEgRU5PRU5UIChObyBzdWNoIGZpbGUgb3IgZGlyZWN0b3J5KQphY2Nlc3MoIi9ldGMvbGQuc28u bm9od2NhcCIsIEZfT0spICAgICAgPSAtMSBFTk9FTlQgKE5vIHN1Y2ggZmlsZSBvciBkaXJlY3Rv cnkpCmFjY2VzcygiL2V0Yy9sZC5zby5ub2h3Y2FwIiwgRl9PSykgICAgICA9IC0xIEVOT0VOVCAo Tm8gc3VjaCBmaWxlIG9yIGRpcmVjdG9yeSkKYWNjZXNzKCIvZXRjL2xkLnNvLm5vaHdjYXAiLCBG X09LKSAgICAgID0gLTEgRU5PRU5UIChObyBzdWNoIGZpbGUgb3IgZGlyZWN0b3J5KQphY2Nlc3Mo IjIiLCBXX09LKSAgICAgICAgICAgICAgICAgICAgICAgPSAwCisrKyBleGl0ZWQgd2l0aCAwICsr Kwo= --001a1140c2dc41351a0522788042-- From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 19 13:37:40 2015 Received: (at 21713) by debbugs.gnu.org; 19 Oct 2015 17:37:40 +0000 Received: from localhost ([127.0.0.1]:57019 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZoENP-0008Al-OR for submit@debbugs.gnu.org; Mon, 19 Oct 2015 13:37:40 -0400 Received: from mail1.vodafone.ie ([213.233.128.43]:21251) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZoENN-0008Ac-BK for 21713@debbugs.gnu.org; Mon, 19 Oct 2015 13:37:38 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjgNANMpJVZtT8uM/2dsb2JhbABUCiiCPFJUb4JctxKGCSGFegECAoE8TAEBAQEBAYELhC0BAQEDATIBRgULCw0LCRYPCQMCAQIBRQYNBgIBAYgkDAEItyeMdgEBAQEGAQEBAR+FfIV5hDBdB4QuBYYFgTSHCYdhhRmJXEiHDI59g29jhAQ9NAGFZgEBAQ Received: from unknown (HELO localhost.localdomain) ([109.79.203.140]) by mail1.vodafone.ie with ESMTP; 19 Oct 2015 18:37:34 +0100 Subject: Re: bug#21713: On CIFS, mv behaves as mv -f To: Sam Kuper References: <562511A3.8020903@draigBrady.com> From: =?UTF-8?Q?P=c3=a1draig_Brady?= Message-ID: <56252A5E.6010609@draigBrady.com> Date: Mon, 19 Oct 2015 18:37:34 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 21713 Cc: 21713@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) tag 21713 notabug close 21713 stop On 19/10/15 18:30, Sam Kuper wrote: > On 19/10/2015, Pádraig Brady wrote: >> On 19/10/15 13:49, Sam Kuper wrote: >>> On a system where `df -T` shows the file system to be "cifs" >>> (presumably the Common Internet File System from Microsoft: >>> https://technet.microsoft.com/en-us/library/cc939973.aspx ), running >>> `mv` causes unexpected behaviour. Essentially, `mv` behaves as though >>> `mv -f` had been used. >>> >>> Example, using GNU Coreutils 8.21 on Ubuntu 14.04.3 LTS: >>> >>> $ which mv >>> /bin/mv >>> $ ls -l >>> total 0 >>> $ echo foo > 1; chmod -w 1; cp 1 2; ls -l | cut -d' ' -f 1-5,9 >>> -r-x------ 1 me me 4 1 >>> -r-x------ 1 me me 4 2 >>> $ echo bar > 2 >>> -bash: 2: Permission denied >>> $ mv 1 2 >>> $ ls -l | cut -d' ' -f 1-5,9 >>> -r-x------ 1 me me 4 2 >>> >>> I would have expected the `mv 1 2` command to have prompted the user >>> before overwriting file 2. It would be helpful to the user if mv could >>> be improved so that it behaves as expected, even on a "cifs" file >>> system. >>> >>> For comparison, running the same commands on a machine with an ext4 >>> file system and a recent version of Coreutils yielded: >>> >>> $ mv 1 2 >>> mv: replace ‘2’, overriding mode 0444 (r--r--r--)? >>> >>> as expected. >>> >>> N.B. I first mentioned this issue at >>> http://unix.stackexchange.com/q/237123/6860 and am grateful for the >>> helpful feedback from the people who commented there, which helped me >>> identify the file system as the likely confounding factor. >>> >>> Thank you for maintaining Coreutils! >> >> I guess that's the write bits being ignored or mapped to another meaning on >> cifs? >> I.E. access(..., W_OK) is returning OK (0) for you? >> You can check this like: strace -e access mv 1 2 > > BEGIN TEST > > $ ls -l > total 0 > $ echo foo > 1; chmod -w 1; cp 1 2; ls -l | cut -d' ' -f 1-5,9 > -r-x------ 1 me me 4 1 > -r-x------ 1 me me 4 2 > $ strace -e access mv 1 2 > access("2", W_OK) = 0 > +++ exited with 0 +++ > > END TEST Right, so the file system is saying we can write to that file, so not an issue with coreutils, rather a limitation of cifs, or your cifs setup. thanks, Pádraig. From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 19 13:44:14 2015 Received: (at 21713) by debbugs.gnu.org; 19 Oct 2015 17:44:14 +0000 Received: from localhost ([127.0.0.1]:57023 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZoETl-0008K7-Lq for submit@debbugs.gnu.org; Mon, 19 Oct 2015 13:44:13 -0400 Received: from mail-io0-f172.google.com ([209.85.223.172]:33960) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZoETj-0008Jz-L2 for 21713@debbugs.gnu.org; Mon, 19 Oct 2015 13:44:12 -0400 Received: by iow1 with SMTP id 1so203639779iow.1 for <21713@debbugs.gnu.org>; Mon, 19 Oct 2015 10:44:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=9WjSDCWjNRveI48HNH6AJsWyzGuULX9OwjbP5Jh2XV4=; b=ibNI7c44xQj4R+Ejew7yUoQ/GRQVqlqoEDLI7J/EcybvFug7S2N/wLgkh1BLfrcZ2C BCZI+nGn7zQZdf493FwOl8E2KV8ekrrgkWrxxnFaIx2QEsvENbpn7PTf+IWLPsy8GNIz VeAQl9jizgktPlue5nrihg6BUcvoaSHB6LMGsxhRLAgMgDwVQklH1btaEoTe909QMnuZ tfr+/2X23OvVb0iceQ5dtbd1CJghekLEVUupxiQqTdtJAIO3pmIfEM8vcmpOJsPDFjWU CyggjA9rXgVWvLwY4+CVHb3na3W0j2GAmnHBR4vsvA0wlupWSQxQ5na1Y0/bA+/f/2l1 AC8w== MIME-Version: 1.0 X-Received: by 10.107.138.169 with SMTP id c41mr33175656ioj.82.1445276651102; Mon, 19 Oct 2015 10:44:11 -0700 (PDT) Received: by 10.64.148.193 with HTTP; Mon, 19 Oct 2015 10:44:11 -0700 (PDT) In-Reply-To: <56252A5E.6010609@draigBrady.com> References: <562511A3.8020903@draigBrady.com> <56252A5E.6010609@draigBrady.com> Date: Mon, 19 Oct 2015 18:44:11 +0100 X-Google-Sender-Auth: lcqmAvGYWtKWDoq8_aaWET9shLI Message-ID: Subject: Re: bug#21713: On CIFS, mv behaves as mv -f From: Sam Kuper To: =?UTF-8?Q?P=C3=A1draig_Brady?= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21713 Cc: 21713@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 19/10/2015, P=C3=A1draig Brady wrote: > Right, so the file system is saying we can write to that file, > so not an issue with coreutils, rather a limitation of cifs, > or your cifs setup. Understood. My guess is that it is a limitation of CIFS. Unfortunately, I am not the sysadmin for the system on which I encountered this issue, so there is no easy way for me to investigate further (e.g. by altering the CIFS configuration to see if the issue persists). Thank you again for your help. Sam From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 24 17:14:00 2018 Received: (at control) by debbugs.gnu.org; 24 Oct 2018 21:14:00 +0000 Received: from localhost ([127.0.0.1]:40674 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gFQTY-0004Hy-8H for submit@debbugs.gnu.org; Wed, 24 Oct 2018 17:14:00 -0400 Received: from mail-pl1-f174.google.com ([209.85.214.174]:34404) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gFQTW-0004Hl-CP for control@debbugs.gnu.org; Wed, 24 Oct 2018 17:13:58 -0400 Received: by mail-pl1-f174.google.com with SMTP id f10-v6so2825125plr.1 for ; Wed, 24 Oct 2018 14:13:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:message-id:date:user-agent:mime-version:content-language :content-transfer-encoding; bh=2h7AX8ONjPicMXGVqeoUKbH/HTpFiN4PAmOONMGOI1E=; b=UcAKF5jwhnnLbtslVwsyR4pWo8It+qXPjGpG7h1EIZlngqL5oS+Xzjv3s6GwjZbm1I r5vVnrH0Dp+FxzbGlhVDzlsPTw/e/TzhYftypgjAf2zM8Ff4oaqczV9tyYpq2ACEE0XH /Kjsi6Wtnr8zoN3P9zdwjopNIYgM0Gu6X7Z9YBgGKnI1iOrYhj6n8qg1ZTMpZiRe6jAh XINLoBZxFtKzh1agjz2iVP7mlaf8ZhgtKNFcjWPHV9kAlLaI1S/wHG6ewVuMhbYB3Smi Y8YoddM6YDz6fPRlkrvNTwGqwHDjYA46KpJ2akVTO3EBRwf9Z9oGQyP1EQD4oWnn2q3u M0vA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=2h7AX8ONjPicMXGVqeoUKbH/HTpFiN4PAmOONMGOI1E=; b=BOSO5mSZXzi503pduYb0iA6v/zLAmiurUIemVI4SK4NuMau4grmoPXnG/jHg5LXysI ZBvxvv1Zwd4PqaIr9iuMtbxaBPLzWsjgv8AWlT3jRkBV7lNEBEeNC0+WwrFsJexUXBw7 3Na2JKS3tsaoaZy2ab+jHSJZ1OGos2Am8Th5cxBUr0/vjfGPI2E6vCQ3TCmPjUdldjMw eCxYkMvuMV4Cd8HOkvFavpXytM+1SwYzF0eAjcS1gYgprZ18x3TMfChV98f1zjLX39sU ez99DeQzJCZl3uruRyPZNxmUFGR87rBrt248Uib14hMsatPAWgSlAU/R/KUNWfGpP5pX SO/Q== X-Gm-Message-State: AGRZ1gKZFnzb7Gs97pA/SBLGiew+MmNf6fwzBkuXgCt2F3mjNHnw3O7K 6viC0jKlW3Uw5v1lhXFzwA3t7Vg1G+4= X-Google-Smtp-Source: AJdET5cuEQ0mnrtnVaOy/lkR3BwWThyXv30WgSyAA0ggLMag7Au0EquuKf+eGYTPCLp5aTxhSycd+g== X-Received: by 2002:a17:902:3181:: with SMTP id x1-v6mr3872057plb.71.1540415632171; Wed, 24 Oct 2018 14:13:52 -0700 (PDT) Received: from tomato.housegordon.com (moose.housegordon.com. [184.68.105.38]) by smtp.googlemail.com with ESMTPSA id o24-v6sm16012191pfa.90.2018.10.24.14.13.50 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Oct 2018 14:13:51 -0700 (PDT) To: control@debbugs.gnu.org From: Assaf Gordon Message-ID: <520ca050-e525-a970-0b15-cfae1ddf720d@gmail.com> Date: Wed, 24 Oct 2018 15:13:49 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: tags 21713 notabug close 21713 [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [209.85.214.174 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (assafgordon[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 1.8 MISSING_SUBJECT Missing Subject: header 0.2 NO_SUBJECT Extra score for no subject X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) tags 21713 notabug close 21713 From unknown Sun Aug 17 22:03:31 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 22 Nov 2018 12:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator