Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

MacOS 10.14.6 NTFS bug leading to data loss

I was copying files from an NTFS drive to a APFS drive and some data was not copied with no warning.

Assuming all the data was transferred I re-purposed the NTFS drive.


Within the folder hierarchy I dragged across (via finder) there were some files and directories with names ending in either a . or a ?

These were not copied and no warning given.

The files do not show up in finder on the mac however they are visible when the drive is plugged into another machine (Linux in this case).


so:

  • in the first instance NTFS on MacOS (Mojave 10.14.6) is not showing all files/direcories on an NTFS drive
  • there is no warning that files/folders have not been fully copied


Note this problem is exacerbated where there is the ability to update NTFS drives (Paragon NTFS for MAC as an example).


Note the problem of the files/directories not being visible exists with no additional NTFS software involved - i.e. it is not a Paragon NTFS specific issue.

Posted on Jun 3, 2020 12:57 PM

Reply

Similar questions

12 replies

Jun 4, 2020 12:21 PM in response to Barney-15E

In the actual case I had a directory containing about 13 files that were created under Linux. They were a few levels down from the root of the NTFS drive in a directory that unfortunately had a name ending with a ?

The copying was done not on the Linux machine but on a Mac as I needed to free up some space on the NTFS drive and I had plenty of space on a APFS drive. So I dragged and dropped the top level directory from the MacOS finder from the NTFS drive to the APFS drive. Some time later the copy was complete and I moved the NTFS drive back to Linux and removed the files I thought I'd copied.


I don't have APFS drivers for Linux so I can't look at that drive other than on a Mac.


Sometime later I wanted one of those 13 files, went to the APFS drive and couldn't find them. They were not on the NTFS drive either because I had erased them assuming the copy had worked.


My expectation is that when an OS claims support for a disk format it should actually work. Being able to create files under Linux but not access some under MacOS is a problem.


I now have Paragon NTFS on the Mac which gives read/write NTFS access. This makes the problem worse because I can copy/move folders on the NTFS drive and loose problem file/directories again without warning. I contacted Paragon and they software is only used when writing to NTFS. They rely on the native MacOS functionality to read the drive.


When raising problems with companies I find it useful to give a simple set of steps to reproduce an issue so they can quickly test and evaluate what may be going on.


Apple unfortunately do not seem to have a mechanism to just report an issue hence my post here. Hopefully at least others will now be aware that there is an issue an take steps to ensure they don't suffer any data loss as a result.


A complete worked example is in the text attachment since I've hit a character limit.


In conclusion, when copying on the Mac neither directory? nor its contained file directory?/file2.txt were copied and no warning given.

Jun 4, 2020 1:59 PM in response to James Chapman

So, it appears the directories and files were copied, but they do not appear in macOS. The same volume, when viewed in Linux, shows the files and directories?

Is that correct?


The developer site has a bug reporter, but you need an account, and you can send feedback to Apple on the Feedback website.

Nothing will ever be done with the problem on Mojave. Development on that OS is complete as of 10.14.6.

I have a Windows 7 PC for a short time, so I can try to replicate on Catalina.


So that I have this correct, you copy from an NTFS drive to an APFS drive on macOS. Does it matter if it is APFS or ExFAT? I have no way to view the drive other than macOS and Windows 7.

Jun 5, 2020 9:55 AM in response to VikingOSX

A bit of an update. I took the drive into work where I use a Windows 10 (build 1903).

  • under Windows it identified the directory ending with a ? but indicated that there was a problem and prevented accessing it.
  • under MacOS there is no indication that the directory even exists or that there is an issue.


So with Windows I am warned there is an issue. Thus prompting taking the drive back to the Linux machine to rename the problem directory before trying again. It would be nice if MacOS did the same thing. It would be even better if it allowed access to the directory.


In conclusion. Linux allows the creating of file/directory names on an NTFS volume that are not portable. Windows detects this and warns the user, MacOS doesn't.

Jun 5, 2020 10:07 AM in response to Barney-15E

Using WSL under Windows 10 seems to have fewer restrictions on file/directory names. A ? is the possible but it is replaced with a different character in the GUI. The 1st directory "directory?" is the one created under Linux.

Back on the Mac (note win.png below is the above snapshot):


It seems that under Windows10 an alternative character is used for the ? which the Mac displays as the question mark in a box.


ExFat has some similar issues hence my move to NTFS.

In the end it would be useful to know when there is a problem which, as my reply above says, Windows 10 does.

Jun 3, 2020 1:39 PM in response to James Chapman

Neither the . nor the ? should cause any issues. However, names that start with . are hidden in unix.


The files do not show up in finder on the mac however they are visible when the drive is plugged into another machine (Linux in this case).

In Finder, cmd-shift-. will show hidden files and directories. If you open the folder where you can't see the files and type that command, do they show up in gray?

there is no warning that files/folders have not been fully copied

Am I missing something or didn't you say that you could see the files/folders on a Linux computer? So, were they copied or not?


Jun 3, 2020 1:57 PM in response to Barney-15E

Here is the output from the terminal from Linux:

/media/james/data/test$ ls -l

total 0

-rwxrwxrwx 1 james james 0 Jun 3 21:50 a_file.txt

drwxrwxrwx 1 james james 0 May 25 14:31 'directory?'

drwxrwxrwx 1 james james 0 May 25 14:31 directory.

-rwxrwxrwx 1 james james 0 May 25 14:32 'file?'

-rwxrwxrwx 1 james james 0 May 25 14:32 file.


and the same drive when mounted under MacOS

james$ cd /Volumes/data/test

natsuki:test james$ ls -al

total 24

drwxr-xr-x 0 james staff 4096 3 Jun 21:50 .

drwxr-xr-x 0 james staff 8192 3 Jun 21:51 ..

-rwxr-xr-x 1 james staff 0 3 Jun 21:50 a_file.txt


Notice that on the Mac only one file is present and the other files and directories are not.

In finder dragging the test folder to the desktop and:

james$ cd ~/Desktop/test/

natsuki:test james$ ls -al

total 0

drwxr-xr-x 3 james staff 96 3 Jun 21:50 .

drwx------+ 17 james staff 544 3 Jun 21:55 ..

-rwxr-xr-x 1 james staff 0 3 Jun 21:50 a_file.txt


The other files and directories were not copied and no warning given. Hence data loss.

Is that a bit clearer?

Jun 3, 2020 4:41 PM in response to James Chapman

They appear to have copied, but are not shown in macOS. That's all I get from that output.

They also appear to be empty files and directories on linux or is that not the size column?

Was there originally something in them?


How about the file flags and extended attributes?


There is nothing about the names that would hide or prevent copying.


I don't see anything that would stop them from copying.

Jun 3, 2020 11:28 PM in response to Barney-15E

The copying was done on MacOS from the external NTFS drive to my MacOS desktop. The files that exist (under Linux) are not seen my the Mac (a bug) and hence the copy on the desktop is incomplete.


The files are empty as they were created to illustrate the problem. They were created using touch/mkdir on Linux. There were no additional attributes added. I'm at a loss as to how you view flags and extended attributes (on the Mac) when they don't show up when listed. ls -a shows all files including those starting with a .


The Mac is copying the files and directories it sees. Since it is not spotting all files and directories it can't perform a complete copy. i.e. a bug and quite a serious one. What should be a copy of the test directory and its contents on my Desktop isn't.


so specifically "They appear to have copied, but are not shown in macOS"; the last ls output is of the "copy" under MacOS. The files are not there - MacOS is not showing files/directories on a APFS partition. So I struggle to see how you can claim they have copied.


my "solution" is to copy the files over a network. Attaching and relying on MacOS to mount the NTFS drive + contents is not reliable.

Jun 4, 2020 11:11 AM in response to James Chapman

The files are empty as they were created to illustrate the problem. They were created using touch/mkdir on Linux.

I didn't ask about hypothetical make-believe files. I asked about the actual files you attempted to copy.


When you copied them over, did the full file copy as shown on a Linux machine. Or, were they not copied at all.

What I understood was that when you checked on Linux, there files were there. When you looked on macOS, they were not there?


If the files did not copy, that is one problem.

If the files copied, but are not visible in macOS, that is a different problem.

But, based on what you have described, I don't have a solution to either problem.


Based on the strange file names, the only thing I wonder is if they are some odd NTFS metadata that doesn't copy over.

Jun 4, 2020 2:24 PM in response to Barney-15E

I formatted a drive as NTFS in Windows and created as many similar files and directories as possible. Windows 7 will not allow a ? in a file name. Maybe it is allowed in Linux.

I used ' and . and _ in the names.

When I named one directory with a . and space at end, it disappeared from Windows.

When I mounted the drive on macOS, all directories and files were visible, including the one that vanished in Windows 7.


I copied the directories over to APFS and all files and directories copied without data loss.

Again, there was no way for me to create a file or directory with a ? in the name.


I have no NTFS software installed.

Jun 6, 2020 4:52 PM in response to James Chapman

When using multiple operating systems and multiple file systems you need to be very careful on naming files & directories so they work on any system. Use a very conservative naming convention for best results. As you've discovered some file systems will do different things in order to display the files, but this can be dangerous.


I don't have APFS drivers for Linux so I can't look at that drive other than on a Mac.

Linux does have a FUSE implementation of the APFS file system driver, but I don't know if it supports writing to the file system. I did try it out a few months ago and it did allow me to view an unencrypted APFS Mac volume. For Debian based distributions you can access the FUSE driver by installing "libfsapfs-utils".


MacOS 10.14.6 NTFS bug leading to data loss

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.