Hi Klauss,

Szabolcs Szakacsits wrote:
> Hi Jean-Pierre,
>
> Could you please reply to Klaus? Thank you.
>   

Of course.

> Best regards,
>               Szaka
>
>
> ---------- Forwarded message ----------
> Date: Wed, 29 Jul 2009 14:47:17 +0200
> From: Klaus Knopper <[email protected]>
> Cc: Szabolcs Szakacsits <[email protected]>
> To: [email protected]
> Subject: Copying xattrs / listing xattrs in development version
>
> Dear Szaka, dear list,
>
> I'm building an application that uses ntfs-3g in order to synchronize
> data on two ntfs-3g filesystems, mounted with the ntfs-3g experimental branch
> (http://pagesperso-orange.fr/b.andre/download-tarball.html#ntfs-3g-2009.4.4AC.15.tgz)
> which supports xattrs (enabled in ./configure).
>
> The initial copy of the filesystems is done partition-wise, to catch all
> "immoveable" data such as partition record and maybe anything else that
> cannot be handled file-wise yet. A later update of the filesystem should
> be done by rsync, taking into account all extended attributes, and
> including system.ntfs_attrib and system.ntfs_acl. These are probably the
> only important xattrs we need, btw. They can be successfully transferred
> using the getfattr and setfattr commands, so in general, xattr supports
> seems to work.
>
> rsync has an --xattr flag, which should copy all xattrs automatically.
>   

Hmm. No to be done blindly.

Both native NTFS ACLs and Posix ACLs are mapped
to extended attributes in the system name space, but
the former would be a binary copy and the latter a
two-way translation. You have to choose according
to destination (on ext3 or NTFS)

Something similar will arise with reparse points when
meaning a symbolic link. What you really want depends
on target fs (and the link may be followed while
copying attributes with the copy program not being
aware).

> Now there ar two problems:
>
> 1. rsync never copies the system.* attributes. I already changed that
> behaviour in rsync for my project, so that part is working.
>
> 2. getfattr -d filename fails to get the list of xattrs with ntfs-3g.
> For this reason, my patched rsync does not find the xattrs, and does not
> even attempt to copy them.
>   

This is not specific to ntfs-3g. On ext3 I get :

[li...@dimension try]$ sudo /bin/mount -oremount,user_xattr,acl 
/dev/sda9 /home
[li...@dimension try]$ setfacl -m 'u::6,u:999:5' file
[li...@dimension try]$ setfattr -n user.color -v green file
[li...@dimension try]$ getfattr -d file
# file: file
user.color="green"
[li...@dimension try]$ getfattr -n system.posix_acl_access file
# file: file
system.posix_acl_access=0sAgAAAAEABgD/////AgAFAOcDAAAEAAYA/////xAABwD/////IAAEAP////8=

> I'm now stuck at finding out why ntfs-3g does have a listxattrs function
> that does not do what I expect. I found a few places in the source that
> seem to remap system xattrs to a different name, but none of them
> explains the problem why NO extended attributes are listed, I even
> commented out the part in fixattrs that is supposed to change system.*
> to ntfs-3g.* and it did not change anything.
>   

This is not in ntfs-3g. When an attribute is returned out of
user name space, it is removed before returning to user.

The current renaming of non-user attributes is done so
that the user ones are stored identically on Linux and
Windows when written by the same Java 7 user program.

> Can you please point me in the right direction? How can I make the
> ntfs-3gs listattr function to actually produce a list of xattrs?
>   

This is probably done by the kernel. Maybe on some
condition.

> Directly listing a specific xattr, for example with  getfattr -R -h -e
> hex -d -n "system.ntfs_attrib" filename, works. Just listing all xattr
> names doesn't.
>   

Hopefully just like on ext3...

Regards

Jean-Pierre



------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
ntfs-3g-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ntfs-3g-devel

Reply via email to