lkml.org 
[lkml]   [2012]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [BUG] NTFS code doesn't sanitize folder names sufficiently
From
Date
On Thu, 2012-07-26 at 20:18 +0200, Marian Beermann wrote:
> Hello everyone,
>
> today I noticed some very odd behaviour, which could lead people to
> believe a loss of data, because it is possible to create directories
> with backslashes in them.
>
> I am currently running kernel 3.5.
>
> To completly reproduce the problem to the full extend you'll need a
> Windows computer, but to see whats wrong Linux completly suffices :-)
>
> On a Linux computer
> 1. Create a directory named TestA on an NTFS partition
> 2. Create a subdirectory of TestA named TestB
> 3. Create a third directory alongside TestA named TestA\TestB (the
> fundamental problem is this: backslashes in directory names)

If you're writing new directories to an NTFS partition, it's very
probable that you're not actually using the in-kernel NTFS driver at
all. It's more likely that you have the userspace (FUSE) NTFS driver
instead:
http://www.tuxera.com/community/ntfs-3g-download/

In fact, they have a FAQ about it the issue that you're seeing:
http://www.tuxera.com/community/ntfs-3g-faq/#posixfilenames2
You use the 'windows_names' mount option to disable creating file and
directory names that confuse windows.

Linux itself (and most native Linux programs) has no issues with
directory names containing the '\' character, of course; the only
characters that you cannot use are '/' and ASCII NUL, 0x00.

--
Calvin Walton <calvin.walton@kepstin.ca>



\
 
 \ /
  Last update: 2012-07-27 17:21    [W:0.104 / U:0.368 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site