Fedora NTFS-3G happily writes files with invalid chars in filename?

Peter Gordon peter at thecodergeek.com
Sun Sep 2 19:32:13 UTC 2012


On 09/01/2012 07:41 PM, Fernando Cassia wrote:
> I mean... if you write on a foreign filesystem, it´d be nice to
> enforce the restrictions of the OS where that filesystem originated.
> One of the reasons people format drives with NTFS on Linux is
> obviously for data interchange with
> Windows machines...

Historically, one benefit of the Windows NT family (versus the older 9x
base) was that it had a POSIX subsystem for government processing (FIPS
151-2, according to Wikipedia).

A big issue with NTFS, being designed to support that feature set, is
that it can be used in both a POSIX namespace and a Win32 namespace. In
the POSIX namespace, which is what Linux's NTFS tools default to, the
only prohibited characters in a filename are the NULL byte (U+0000) and
the forward slash (/). On the other hand, when being used through the
Win32 namespace, the list of prohibited characters grows to include the
 backslash (\), colon (:), asterisk (*), question mark (?), quotation
mark ("), less-than and greater-than symbols (<, >), and the pipe symbol
(|).

So, I've made it a personal habit to refrain from using any of these
when manipulating data on NTFS, whether from Linux or Windows, in order
to prevent such problems from happening in the first place.

A quick Google search reveals that you can set the "windows_names" mount
option to restrict the creation of filenames to be Win32-compatible.
That may be worth a try. :)

Hope that helps.
-- 
Peter Gordon (codergeek42) <peter at thecodergeek.com>
Who am I? :: http://thecodergeek.com/about-me

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 259 bytes
Desc: OpenPGP digital signature
URL: <http://lists.fedoraproject.org/pipermail/users/attachments/20120902/8529d96a/attachment.sig>


More information about the users mailing list