FAQ SearchLogin
Tuxera Home
View unanswered posts | View active topics It is currently Sat May 15, 2021 04:10



Post new topic Reply to topic  [ 6 posts ] 
linux-windows compatibility (hidden files & symbolic links) 
Author Message

Joined: Tue Feb 20, 2007 09:16
Posts: 4
Post linux-windows compatibility (hidden files & symbolic links)
Hello, I would like to completely move my home diretcory to an NTFS partition.
I've already moved all my files and tested a gnome login, which works.

To complete my migration I need to know 2 things:
- how can I set the hidden file attribute from linux?
- how can I create a symbolic link comptatible with windows 7?

Thank you very much for your help.


Fri Apr 16, 2010 15:31
Profile
NTFS-3G Lead Developer

Joined: Tue Sep 04, 2007 17:22
Posts: 1286
Post Re: linux-windows compatibility (hidden files & symbolic links)
Hi,

Quote:
To complete my migration I need to know 2 things:
- how can I set the hidden file attribute from linux?

see http://www.tuxera.com/community/ntfs-3g ... attributes

Quote:
- how can I create a symbolic link comptatible with windows 7?

see http://www.tuxera.com/community/ntfs-3g ... lic-links/
This is more complex, and virtually impossible for cross-device links, because Linux cannot know which physical address (eg device letters) Windows assigns to a partition. To my knowledge, the only way, is to use relative symbolic links leading to the same partition. ntfs-3g provides an extended attribute interface to do that (http://www.tuxera.com/community/ntfs-3g ... eparsedata) but a high-level interface would be useful.

Regards

Jean-Pierre


Fri Apr 16, 2010 16:58
Profile

Joined: Tue Feb 20, 2007 09:16
Posts: 4
Post Re: linux-windows compatibility (hidden files & symbolic links)
Thanks for the suggestions.

I've read the ntfs attributes but I didn't understand the hex value.
in the example you use "0x01000000" for readonly, which is definitely not "1" as written in the documentation above.

About links, it would be great if when using "ln -s" inside the ntfs partition, the link would work on windows too...


Fri Apr 16, 2010 17:15
Profile
NTFS-3G Lead Developer

Joined: Tue Sep 04, 2007 17:22
Posts: 1286
Post Re: linux-windows compatibility (hidden files & symbolic links)
Hi again,

Quote:
I've read the ntfs attributes but I didn't understand the hex value.
in the example you use "0x01000000" for readonly, which is definitely not "1" as written in the documentation above.

Actually this depends on the byte ordering of your computer. Most computers are low-endians, which means the low-order bytes are shown first. If the attribute were 0x12345678, the low-order byte is 0x12 and the high-order byte is 0x78. The problem stems from getfattr not knowing the attribute is a 32-bit integer (this ordering was probably designed to bypass some IPR...)

The read-only attribute being 0x01, you see 01 at the beginning.
The hidden flag is 0x02, so you should do something like :
Code:
setfattr -h -v 0x02000000 -n system.ntfs_attrib <file>

Note : changing the system flag is not recommended.

Quote:
About links, it would be great if when using "ln -s" inside the ntfs partition, the link would work on windows too...

And this would mean leaving pre-Vista Windows out.

Regards

Jean-Pierre


Fri Apr 16, 2010 17:38
Profile
NTFS-3G Lead Developer

Joined: Tue Sep 04, 2007 17:22
Posts: 1286
Post Re: linux-windows compatibility (hidden files & symbolic links)
Hi,

Quote:
Can you be more clear here? Vista only introduced symbolic links for files.

Yes : symbolic links for files and directories, and relative symbolic links. In absolute symbolic links the target is defined by a physical address, such as a volume letter.

Quote:
Earlier versions of Windows only have symbolic links for directories

No : only volume junctions and directory junctions were supported. In such junctions the target is designated by a physical address.

Can you post the code to translate a volume letter to a Linux device path, and conversely ?

AFAIK only relative links internal to a volume can be built on Linux, but they would not be compatible with pre-Vista Windows (when I have time, I will post a tool to do that). In this situation a hard link can be used for a file and it is compatible with older Windows.

Regards

Jean-Pierre


Thu Apr 28, 2011 10:34
Profile
NTFS-3G Lead Developer

Joined: Tue Sep 04, 2007 17:22
Posts: 1286
Post Re: linux-windows compatibility (hidden files & symbolic links)
Hi all,

Quote:
AFAIK only relative links internal to a volume can be built on Linux, but they would not be compatible with pre-Vista Windows (when I have time, I will post a tool to do that)
.
Available now on http://www.tuxera.com/community/ntfs-3g ... /#download see file winsln.c within tools.zip

Regards

Jean-Pierre


Mon May 23, 2011 15:35
Profile
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Original forum style by Vjacheslav Trushkin.