Renaming a file through Samba overwrites existing one
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
samba |
Fix Released
|
High
|
|||
gvfs (Ubuntu) |
Triaged
|
Low
|
Unassigned | ||
samba (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: samba
Using Ubuntu "Jaunty" 9.04 with Samba 2:3.3.2-1ubuntu3.
I have a local server with directories shared through Samba and access them from another computer using Nautilus. When renaming a file to a name that already exists in the current dir, the original file is replaced without warning instead of having an error message like "can't rename: file already exists".
E.g.:
- access a Samba share through Nautilus
- create two blank files (blank_file_1 & blank_file_2)
- rename blank_file_2 to "blank_file_1"
- blank_file_1 is lost forever and now replaced by the content of blank_file_2
The problem doesn't happen with a remote directory mounted as sftp (error message saying that the file already exists) but does happen with the "mv" command in command line (in local dir or through ssh) so I'm not sure if the problem is related to Samba or mv or both.
Is mv supposed to overwrite existing files without warning or errors ?
Changed in gvfs (Ubuntu): | |
status: | New → Triaged |
Changed in samba: | |
status: | Unknown → New |
Changed in samba: | |
importance: | Unknown → High |
Changed in samba: | |
status: | New → In Progress |
Changed in samba: | |
status: | In Progress → Fix Released |
Yes, it's normal behavior for mv to overwrite without warning in this case. Use "mv -i" to prompt on overwrite.
I'd say it's a bug in Nautilus, if any. Probably linked to bug 316653.