[TriLUG] cp and a new fs, eg ntfs

Joseph Mack NA3T jmack at wm7d.net
Sat Jul 31 09:44:20 EDT 2010


On Fri, 30 Jul 2010, Alan Porter wrote:

Kevin wrote

>> As long as the NTFS driver understands the permissions, 
>> and they map to something reasonable in Unix permissions, 
>> yes.

This is the part I want to know about. If copying ntfs to 
ext3, then sure, do your best to give the new file sensible 
permissions. But if copying ntfs to ntfs, then is all the 
metadata an exact copy?

Alan wrote

> Remember that the file NAME and PERMISSIONS are not 
> actually part of the file itself, but they are "meta-data" 
> that is stored in the directory entry that points to the 
> file.

I know they are separate from the data (inspecting with a 
binary editor, the data starts after the magic number), but 
where the various bits are, I didn't know. I guess 
everything except the data would have to be in the inodes, 
there's nowhere else, and the ntfs fs would have ntfs type 
inodes. So if everything was sensible, the kernel would say 
to the ntfs driver "here's the inode data, you write it".

> So the NTFS driver will copy the contents of the file 
> without altering it, but when it first creates the file, 
> it might mangle the filename to match some 8x3 
> compatibility nonsense, or some case-insensitivity 
> silliness, and it might also re-jigger the permission bits 
> to look more Windows-like.

again ntfs to ext3, sure, do your best. But ntfs to ntfs, 
what happens?

I'm assuming it's possible/likely that ntfs to ntfs copy 
made with linux, will be seen by windows as an exact copy. I 
don't have a way of testing this just yet. Derek's test of 
booting the copy would be a good start. However the disk I'm 
copying (friend's laptop) is full of viruses and won't boot.

The machine I'm working on is my introduction to non-trivial 
windows virus infections. I hadn't realised how fragile the 
windows ecosystem is. You can't easily inspect conf files 
and if an executable is suspect, you can't just download the 
source code and recompile. It's like not being able to ever 
wash your hands. Why do people accept a broken-by-design 
system like this?

Joe

-- 
Joseph Mack NA3T EME(B,D), FM05lw North Carolina
jmack (at) wm7d (dot) net - azimuthal equidistant map
generator at http://www.wm7d.net/azproj.shtml
Homepage http://www.austintek.com/ It's GNU/Linux!



More information about the TriLUG mailing list