Cannot change filename

once in a while, i cannot change a filename in the finder. i think this has only happened to a file that i produced by File → Duplicate. There are lots of suggestions on the web about how to deal with this situation (i just went to terminal and used ‘mv’ command), but i have not found anything that explains why this would happen. i can change filenames of all the other files in the same directory (including the original that i duplicated). does anyone have an idea of what causes this problem or how i can diagnose the problem? thanks for your throughts.

If you know your way around “mv” then you probably did this, but can’t hurt to ask:

If you select one of these files, then choose the “File / Get Info” menu item, does it show that you have read & write permissions?

yep! checked get info and ls -l. same permissions and ownership.

This has happened every once in a while, mostly with new files that are in OneDrive and my Mac. In most cases after a few minutes it returns to normal. In other cases I selected the folder containing the file and changed the permissions to everybody read and write including all items in the folder

What are the permissions of the folder that contains the file? You need write permissions on the enclosing folder to modify a filename or delete a file or add a new file to the folder.

Thanks for this suggestion. I had looked at permissions and I did indeed have read & write access to the directory. But I noticed that ls -l command revealed a trailing “@” which means that there are “extended attributes” to the directory (drwxr-xr-x@). The ls -ld@ command reports dropbox attributes:

drwxr-xr-x@ 8 jajacobs  staff  256 Feb 27 16:24 PGI/
	com.apple.macl	 72 
	com.dropbox.attrs	 26 
	com.dropbox.internal	  0 

Now I wonder if the problem was connected to files in a DropBox folder.

Unfortunately, the Finder-not-able-to-change-the-filename problem is intermittent, and I have not been able to duplicate it today. I did notice that, the ls -l@ command on the file that Finder couldn’t change showed that it had the extended attribute com.apple.FinderInfo 32. Other files lacked that attribute.

I’ll dig into this more the next time the problem arises and examine extended attributes more closely.

Thanks for your suggestions!

Quite possibly. I don’t know about DropBox, but I do know that Microsoft SharePoint/OneDrive has issues like this. You can’t rename or move a file while it is being synchronized with its server-side copy.

If you (or anyone else) edits the file, whether a local copy or the remote copy, those operations get blocked until the file re-synchronizes. After which they will work fine. Normally, the time where this blockage occurs is very short, but if there’s a network or server glitch, it could take longer.

The FinderInfo extended attribute contains data that the MFS/HFS/HFS+ file systems used to store in directory listings. APFS (and non-Apple file systems) don’t have this data in their directory listings, so they are either stored in extended attributes (e.g. on APFS and NTFS) or in so-called ._ files for file systems that don’t support extended attributes.

It typically stores things like the old type/creator codes, bits indicating if there is a custom icon, color highlights, icon/window positions, etc. Its specific content is mostly undocumented.

The one attribute that might affect your ability to rename a file would be the “locked” attribute. You should be able to check/change that by doing a “Get Info” from the Finder.

See also: xattr: com.apple.FinderInfo, information for the Finder – The Eclectic Light Company

Thanks David! This is very helpful. I think the most likely explanation is the DropBox/synching issue. I will investigate more the next time it happens and post here if I learn more. Thanks again!