Bug 8228 - vfs_module 'crossrename' drops ACL's and extended data streams
vfs_module 'crossrename' drops ACL's and extended data streams
Product: Samba 3.6
Classification: Unclassified
Component: VFS Modules
All All
: P5 enhancement
: ---
Assigned To: Björn Jacke
Samba QA Contact
Depends on:
  Show dependency treegraph
Reported: 2011-06-13 19:32 UTC by Linda Walsh
Modified: 2011-06-15 08:03 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Linda Walsh 2011-06-13 19:32:22 UTC
Looking at the source for 'crossrename' -- while it does try to copy file ownership,
it makes no effort to copy over file's ACL's or extended data streams (which may be
the same storage mechanism on some file system types).

This makes it a problem waiting to happen -- especially if the user has stored alt data streams -- not common, but the consequences data loss could be unpleasant, especially if one is used to samba storing ACL's and extended data streams in the files (i.e. uses Samba on XFS)....

Even (or especially?) if such data is kept externally using a tdb file -- there's no code
to support copying that over for the new file either.

(may be low priority, depending on usage and expectations...)
Comment 1 Volker Lendecke 2011-06-14 09:28:27 UTC
Björn, that's your module. Assigning the bug to you.
Comment 2 Björn Jacke 2011-06-14 09:59:27 UTC
this has always been a limitation of the fast path rename for cross filesystems renames. That was the main reason why I pulled that into a vfs module, previously this was the default in the main smbd code. The possible loss of ACLs is documented in the man page of vfs_crossrename. The default behaviour of smbd (without using crossrename) actually improved.

If you have patches for vfs_crossrename availbable which preserver ACLs etc. feel free to attach them. I'm closing this as LATER for now as this is a known limitation of the module.
Comment 3 Linda Walsh 2011-06-14 17:41:23 UTC
Is the loss of user data in alternate data streams also documented?

It's not just ACL's.
Comment 4 Björn Jacke 2011-06-15 08:03:15 UTC
see man vfs_crossrename:
There are however limitations that this module currently does not solve:
- the ACLs of files are not preserved
- meta data in EAs are not preserved