I started receiving error messages on certain files on Linux.
The error was:
Cannot write file "xx path to file xx~random characters. ffs_tmp"
EINVAL: Invalid argument [open]
Inspecting the various errors I noted that they all contained a colon character in the filename. This resulted from saving an email from the Thunderbird application where the email was a reply and therefore the subject line started with "Re: ". When the email is saved Thunderbird uses the subject line as the filename so the colon appears in it.
If I manually remove the colon from the original filename it copies fine, so that's a simple workaround.
A colon is not allowed in Windows and while not recommended in Linux, it is valid. Not sure about Mac.
Small bug with file name containing colon
- Posts: 4
- Joined: 21 Feb 2021
- Posts: 4056
- Joined: 11 Jun 2019
That's not a bug, that's just FFS respecting filesystem limits. Mozilla needs to update that to strip illegal characters
- Posts: 4
- Joined: 21 Feb 2021
The issue is that a colon is a valid character in a filename in Linux. I can create valid file names containing a colon without any trouble. Thunderbird already strips the colon under Windows since it is invalid in Windows, but doesn't strip it in Linux because it is valid.
- Posts: 4056
- Joined: 11 Jun 2019
Well that error shouldn't show up? That error may come up in FFS but it is probably just relaying the error
- Posts: 4
- Joined: 21 Feb 2021
As far as I can see that error shouldn't show up. I can quite easily create a file with a colon in the name (using Linux Mint with Cinnamon desktop or the terminal) and the file system has no problem with it and no errors appear, so the OS shouldn't be giving an error to FFS.
I suppose it could be coming from some library FFS uses rather than FFS itself but I have no way of telling.
It has a simple manual solution by deleting the colon so it's not a big deal, more a minor irritant.
I suppose it could be coming from some library FFS uses rather than FFS itself but I have no way of telling.
It has a simple manual solution by deleting the colon so it's not a big deal, more a minor irritant.
- Posts: 309
- Joined: 7 Jan 2018
I suppose that while colons are acceptable on common Linux filesystems, Linux does use colons for path separators, like in the environment variable PATH. I highly, highly recommend you avoid using colons in filenames. (Spaces also are technically allowed but cause all sorts of unamusing problems.)
- Posts: 4
- Joined: 21 Feb 2021
I agree that using colons is not a good idea, especially in directory names, since that would cause problems if that directory is needed in a path variable. I don't use colons in filenames but the reason I tripped over the bug was that the filename was being created automatically by the save of an email (unless it's spotted and changed at the time of the save).
It's just a small irritant since it causes an error in FFS and then I have to go to the file and change the name, then re-run FFS to get the files synced.
It's just a small irritant since it causes an error in FFS and then I have to go to the file and change the name, then re-run FFS to get the files synced.
- Posts: 4056
- Joined: 11 Jun 2019
It's like someone sending you unpaid mail and getting mad at the delivery guy because he needs money to pay the fee.
I would submit an issue to Mozilla and see if they implement better cross-platform support
I would submit an issue to Mozilla and see if they implement better cross-platform support
- Posts: 1
- Joined: 1 Mar 2021
It's a PIA, but I use ThunarBulkRename to check on anything that is not a regular a-z character in the file name and replace it with '_'. Works good.
- Posts: 1
- Joined: 1 May 2021
Has a bug been created for this? I never create files with colons myself, but some applications do definitely use them. As long as they are valid on Linux, they should work.
- Posts: 5
- Joined: 3 Jan 2023
I have run into a similar failure with filenames having parentheses. Linux has no problem with any of these "special characters", and I don't use Windows, so I'd expect transfers from one drive to another on Linux to work with legal characters. Modifying all the files using certain legal characters is not really an option.
EDIT:
On further investigation, I have a theory on this which I plan to follow up on...
My problem was syncing to a USB thumb drive, which I see now was formatted as exFAT. When I did a test from from my standard Linux ext3 directories, backslashes were handled just fine. But not trying to sync to the exFAT drive.
Parentheses are OK. However, I discovered that filenames ending with a period are not OK, and I believe my earlier errors that I thought were due to parentheses may have inadvertently had a trailing period that I didn't notice in the error message.
The problem with Linux is not that it allows almost any character in a filename, it's that it allows these lesser filesystems to be used which have their own rules. So, when using FAT, you need to follow FAT filesystem rules. When using NTFS or exFAT, the same thing applies.
EDIT:
On further investigation, I have a theory on this which I plan to follow up on...
My problem was syncing to a USB thumb drive, which I see now was formatted as exFAT. When I did a test from from my standard Linux ext3 directories, backslashes were handled just fine. But not trying to sync to the exFAT drive.
Parentheses are OK. However, I discovered that filenames ending with a period are not OK, and I believe my earlier errors that I thought were due to parentheses may have inadvertently had a trailing period that I didn't notice in the error message.
The problem with Linux is not that it allows almost any character in a filename, it's that it allows these lesser filesystems to be used which have their own rules. So, when using FAT, you need to follow FAT filesystem rules. When using NTFS or exFAT, the same thing applies.
- Posts: 5
- Joined: 3 Jan 2023
So, I have learned that copying from Linux to Windows partitions like exFAT or NTFS has restrictions.
Linux can't copy a file/folder to exFAT ending with a period. It gives an error. If the file ends with spaces, they will be removed, causing problems with future compares which will fail.
There are several illegal characters, but parentheses are not one of them. Most of them are not surprising if you are familiar with Windows; it includes quotes, asterisks, forward and back slash, angle brackets, colon, question mark, and vertical bar.
For pure Linux drives, only the forward slash and null character are illegal.
Linux can't copy a file/folder to exFAT ending with a period. It gives an error. If the file ends with spaces, they will be removed, causing problems with future compares which will fail.
There are several illegal characters, but parentheses are not one of them. Most of them are not surprising if you are familiar with Windows; it includes quotes, asterisks, forward and back slash, angle brackets, colon, question mark, and vertical bar.
For pure Linux drives, only the forward slash and null character are illegal.
- Site Admin
- Posts: 7211
- Joined: 9 Dec 2007