GNU bug report logs -
#21713
On CIFS, mv behaves as mv -f
Previous Next
Reported by: Sam Kuper <sam.kuper <at> uclmail.net>
Date: Mon, 19 Oct 2015 15:36:02 UTC
Severity: normal
Tags: notabug
Done: Assaf Gordon <assafgordon <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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!
Sam
This bug report was last modified 6 years and 271 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.