Writing data to NTFS partition in Unix and Linux to share with others can be destructive and risky

Hi I am Rupesh from India and I brought a new desktop pc with ryzen 5500GT cpu and Asus prime b450 motherboard. I installed Linux freebsd along with windows 11 and everything is working fine except I can't copy files properly to NTFS partition and share those files with others or other computers.

I love using unix and Linux operating systems and I have the habit of sharing files present in Unix and Linux operating systems with other people and even I use those files outside Linux operating systems I mean I use them in windows 11 operating system.

In Linux operating system I have the habit of downloading youtube videos and compress them to av1 codec and finally move the compressed files to NTFS partition or file system for backup or to view those videos in windows. I have the habit of downloading mp3 music files from websites and transfer them to NTFS partition or file system.

Suppose I have 1000 files which I want to transfer them to NTFS partition or file system and moved them to NTFS partition using Nautilus file manager and after booting windows 11 and try to open the moved folder I am getting error as folder or directory inaccessible. Now inorder to overcome this problem I may issue the following command

chkdsk d: /f /x

This command checks for file system errors and after that when I try to open the moved folder I am able to access the particular folder but unfortunately I am able to see only 800 files and so the remaining 200 files are lost.

The second issue is suppose now I have downloaded 1000 files and transferred those files to NTFS partition and after two to three months I have decided to install my present Linux operating system from the beginning and I have installed it from the beginning and after that I have mounted the same NTFS partition in file manager and succeeded and I am able to write new files but if I want to move the previously copied or moved 1000 files from NTFS partition to my home folder I can't.

If I continuously use the same Linux operating system for years without installing freshly from the beginning there's no problem but if I install it freshly then I can't move files from NTFS to my home folder.

Today I have installed freebsd operating system and in Linux operating system I have copied 100 files to NTFS partition and after booting into freebsd I can't move those particular 100 files from NTFS partition to my home folder.

I can't move means when I open any file manager and right click on the particular folder which is problematic I can't see option cut.

Copying or moving data between Linux operating systems of other computers is easy through Linux native partitions like xfs or ext4. And even you or me can't delete a file or folder which was copied from other computers and inorder to delete it I must open a terminal emulator and gain super user permissions and navigate to the directory and finally issue the following commands to delete them permanently

rm -rf
rmdir

I think that lots of security information is added to the copied or moved files and directories when they are copied to mounted partitions.

Previously I lost 30 gb data by moving files from Linux local xfs file system to NTFS partition. Today I lost 2 gb data by moving data from freebsd ufs2 file system to NTFS partition.

I know that you are getting annoyed through my explanation and so I will illustrate what's going on as below

Today we can create a zip file through compressing a folder and add security to it by adding password to it and you have distributed to other people without providing password and finally they can't access it.

The same thing is happening in the present situation also I have some files in my unix system and I have copied them to NTFS partition or file system but unfortunately the operating system copied files along with user credentials like username or password uid etc.,.

I or other people have tried to mount the same NTFS partition in another unix system but can't move or delete those files because username or password uid are invalid.

Another issue is suppose in my NTFS partition or file system I have 1000 files and transferred those files to my unix or Linux system and opened a terminal emulator and after that I have navigated to the concerned directory on which transferred files are present and issue list command I am getting unknown ASCII characters in the terminal emulator which are not part of the file names.

Many people and all of you mostly work in Unix or Linux systems only but don't try to transfer files to and from NTFS partitions but I frequently use both systems. So you have not noticed any such errors.

You can suggest to turn off hibernation in windows 11 and I have already done even no use.

Please try to rectify this particular problem ie., moving files to NTFS partition without any security information. If you rectify this issue many people will be benefited.

Regards,
Rupesh.

Linux OR FreeBSD? Or both?

If you get a corruption in NTFS then perhaps it helps to mount it with a flush option. In Linux from
man mount
...

flush
If set, the filesystem will try to flush to disk more early than normal. Not set by default.

1 Like

Others suggested to use exfat partition while sharing data between various operating systems and so I have created exfat partition and tried to share data between them using exfat.

At present everything thing is working fine and no user credentials are copied along with files or folders.

I can't understand what is the need of copying user credentials along with files or folders when NTFS partition is used as destination.

What makes you think that?
Why do you think Samba/smb server were created?

I can't understand what is the need of copying user credentials along with files or folders when NTFS partition is used as destination.

That is only because Windows does not manage their credentials like all other unix/linux do...

1 Like

NTFS was originally (1993) designed to support Windows NT File Systems, although the technology has since been integrated into all versions of Windows. From the Wikipedia article:

NT has supported per-object (file, function, and role) access control lists allowing a rich set of security permissions to be applied to systems and services.

Those features are largely incompatible with any of the Unix/Linux file systems, which do their best to emulate where they can. That is why Linux inserts credentials etc. -- to make subsequent Windows access workable.

Windows achieves better performance in NTFS with a feature called FastStart. This avoids searching through the file system details during reboot by saving an internal OS table to a hidden file on shutdown, and reading that back on reboot. Unfortunately, on shutdown or hibernation it does not update the file system superblock data, which mis-informs subsequent Linux accesses.

That means any of your Windows clients that does not have FastStart disabled is leaving the NTFS file system without critical data in the file system itself. That looks like corruption to Linux. That effect is going to be cumulative over time. It cannot be resolved in the general case, because each Windows machine will have its own private FastStart file.

Other side effects include (a) Hard link counts being incorrect, as the field is subverted for reasons I cannot determine; and (b) The whole of a mounted NTFS partition will be owned by the user who mounted it, ignoring all the credentials in the file system itself.

Your assumptions about other people's working arrangements are wide of the mark. I have archives for most of my work since 1987, including floppy disks (and a USB 3.5" drive), plus six NTFS partitions, all working in Linux Mint 19.3.

3 Likes

In other words, you must detach the disk in an OS before you may use it in another OS.
In Linux a detatch is a umount, in Windows a "safely remove hardware/eject".
A shutdown of the OS detaches the disk, but not a suspend or hibernate.

In addition disable faststart in Windows!

2 Likes

Thanks for your suggestions and patience.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.