Renaming files (changing capitalization) on external USB fat32 drives not allowed

Bug #231864 reported by Chris H.
26
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Ubuntu
Confirmed
Undecided
Unassigned

Bug Description

I'm on a Dell E1505 with Ubuntu 8.04 with all patches as of Monday, May 19, 2:01 AM (Pacific time).

I'm not sure if this is related to the drives being a specific format or not, but it doesn't happen on my ReiserFS or NTFS partitions, which are on my internal hard drive.

This problem happens on two external FAT32 hard drives.

If I change the capitalization of a filename of a file or directory, Nautilus tells me "The item could not be renamed." This is not a nautilus-only issue, because this happens when I use mv to rename a file or folder. By changing capitalization, I mean changing a file's name from BLAH to blah, or Blah to blah, etc.

In Nautilus, I right-clicked a file or folder, and changed the name to lowercase. This failed, so I tried using mv, which also failed. I then tried renaming a bunch of other files and folders by switching from uppercase to lowercase and vice versa. I also tried changing the case of a bunch of letters at once. All attempts failed, both in Nautilus and in gnome-terminal. The virtual console (ctrl-alt-F1) also doesn't rename the file (it tells me that the two names are the same, yet it doesn't spit this error out when I do the same operation to files on my ReiserFS partition.)

It seems FAT32 doesn't make any distinction between lowercase and uppercase (I just cd into a directory while using lowercase letters when the name of the directory has uppercase letters.) Either way, regardless of the file system involved, I would expect consistent behavior. Because Nautilus does sort files by case (lowercase before uppercase), the capitalization DOES matter, therefore even if FAT32 doesn't differentiate between lower and uppercase, Ubuntu should intervene somehow to allow the changing of the capitalization without any hassles.

What I mean is, even if FAT32 doesn't distinguish between lowercase and uppercase, humans do see a difference and Nautilus does behave differently (it sorts the files differently based on capitalization.) Also, it still is possible to change the capitalization by changing the filename to an intermediate step (ex. changing "Blah" to "lah" to "blah"), which changes how the files are displayed in Nautilus.

I do not have external drives in any other format, nor do I have any FAT32 partitions on my internal hard drive, so I can't be any more specific than that. I'm not sure what to name this bug, so when I was searching for this bug (hoping it was already submitted), I could not find anything similar. I'm also not sure under what package I should file, because I'm not sure what handles file operations.

If your logic is to rule this bug invalid because FAT32 isn't case-sensitive, then at least the error needs to be more clear... or Nautilus needs to not sort by capitalization for FAT32 file systems, because those behaviors are contradictory (you don't differentiate between lowercase and uppercase, yet you sort files differently?)

Revision history for this message
tian (nopararas) wrote :

I get the same error on a usb drive but not on any other place in my computer (ie the ext3 and ntfs drives).

Revision history for this message
tian (nopararas) wrote :

I forgot to mention.
I get this error on diferent computers all running Ubuntu 8.10 fully updated.

Revision history for this message
araneae (marielle-gmail) wrote :

Yup, it's a problem that only occurs on FAT formatted drives, as they are case preserving but not case sensitive. The file browser compares the name you're changing the file to all the names of the files in the folder to make sure you aren't duplicating the name. Since it is not case sensitive, it counts the former name of the file as the same as the current name, and claims you're duplicating the name.

It seems like it should be an easy fix.

Revision history for this message
Victor Zamanian (victorz) wrote :

Was just about to file a bug on this. The behaviour this bug is producing is incredibly annoying for me. I do a lot of upper and lower case renaming on my FAT32 drive (while sorting music) and I often have to "2-step rename" my files and folders with an intermediate, temporary name, so this bug is kind of crucial to me in a way; I'd love to see this fixed. :-)

Revision history for this message
Chris H. (ahmshaegar) wrote :

Just want to post some updates:

Now on Ubuntu 9.10, and the bug is still present. It doesn't matter if you rename the file using mv or through the GUI. Now, once again, I understand that FAT filesystems aren't case sensitive, but if you're going to show uppercase and lowercase, then you (the user) should be able to rename "Example" to "example" in one step. Perhaps mv should keep its current behavior, but the GUI should do a "two-step rename" for the user?

Revision history for this message
WH Mitty (whmitty-mailward) wrote :

My "two step" work around for this was to for example name example.TXT to example.TX? where "?" is any other character but the original uppercase character "X" then rename example.TX? to example.txt. Seems to work OK but what a pain in the posterior.

Revision history for this message
MShepanski (mjs7231) wrote :

This happens to me when renaming via an NFS mount to Mac HFS as well.

Revision history for this message
S Barnes (ironictoo) wrote :

Still hasn't been fixed on 12.04 all the latest updates. In my case I am using a CIFS mounted network drive. In seems the error message has been updated, now it says "The name FILENAME.TXT is already used in this folder. Please use a different name." Workaround by WH Mitty does work.

Revision history for this message
Chrescht (sekateur) wrote :

I confirm this bug, happening on Ubuntu 16.04 on a cifs mounted network drive.
Used to work on Ubuntu 12.04 though.

Revision history for this message
Szabó Péter (quiller) wrote :

Noticed this bug in Ubuntu 17.10, not sure if I've seen this before. Cifs mounted network drive, error message is "The name FILENAME.TXT is already used in this folder. Please use a different name."
Renaming with 'mv' via command line is working.

My fstab line is:
//192.168.1.10/share /media/my/share cifs _netdev,users,vers=3.0,noserverino,uid=uid,gid=gid,credentials=/etc/credentials 0 0

Revision history for this message
Kenivia Fan (kenivia) wrote :

It seems that this extends to the name(label in gparted) of FAT partitions. I tried to rename FAT partitions from gparted and it changed every letter to capital.

Running on Ubuntu 18.04 LTS, gparted 3.2

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.