NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/52724: ntfs driver doen't allow ':' in file names.



The following reply was made to PR kern/52724; it has been noted by GNATS.

From: Dave Huang <khym%azeotrope.org@localhost>
To: gnats-bugs%NetBSD.org@localhost, kern-bug-people%netbsd.org@localhost,
 gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost
Cc: 
Subject: Re: kern/52724: ntfs driver doen't allow ':' in file names.
Date: Mon, 13 Nov 2017 16:59:57 -0600

 On 11/13/2017 5:05, trebol4444%gmx.com@localhost wrote:
 > In a POSIX environment, all unicode characters except '/' and '\0' must be allowed in file names of a ntfs file system.
 > 
 > The ntfs driver of NetBSD uses ':' for representing ntfs attributes, making impossible to properly read any file with ':' in its name.
 >> How-To-Repeat:
 > Write a file with ':' in its name using a POSIX OS without this problem, and try to read it in NetBSD with the kernel's ntfs driver.
 
 Which POSIX OS lets you do that? While Windows NT used to have a POSIX 
 subsystem (https://en.wikipedia.org/wiki/Microsoft_POSIX_subsystem), 
 that was discontinued long ago.
 
 While perhaps technically correct that NTFS filenames can contain ":", 
 in practice, the vast majority of files on an NTFS filesystem will have 
 been written by some version of Windows, and the Win32 subsystem does 
 not allow ":" in filenames. Even the replacement for the POSIX 
 subsystem, the Windows Subsystem for Linux, doesn't actually store ":" 
 on disk; if you create a file with a ":" in the name, the actual on-disk 
 name has the ":" escaped as "#003A". So I would say that if you actually 
 have an NTFS filesystem with a file that has ":" in the name, you'd have 
 a lot of trouble reading it on an actual Windows machine.
 
 In Windows, ":" in filenames are used for Alternate Data Streams 
 (https://blogs.technet.microsoft.com/askcore/2013/03/24/alternate-data-streams-in-ntfs/). 
 E.g., you can "echo text > somefile.txt:somestream" and "more < 
 somefile.txt:somestream". And alternate data streams are just another 
 attribute of a file in NTFS. I don't know whether NetBSD's ntfs 
 implementation allows accessing ADSes, but it sounds like it might if 
 it's treating ":"s as special. In which case, I don't think it should be 
 changed to some other character, since that would make it work 
 differently than an actual Windows machine.
 


Home | Main Index | Thread Index | Old Index