[Box Backup-dev] Re: [Box Backup] Attributes not backed up correctly, also request to add ACL support
Ben Summers
boxbackup-dev@boxbackup.org
Wed, 12 Aug 2009 06:48:28 +0100
Chris Wilson wrote:
> 1. cramming the Windows file attributes into the Unix 9-bit format
> in such
> a way that restores of Windows files on Unix will have weird
> permissions
> (we already go to great lengths to avoid restoring files with all-zero
> permissions on Unix which makes them unreadable to anyone but root);
> or
>
> 2. storing Windows files with attributes that are not backwards-
> compatible
> with old clients or compatible with being restored on Unix.
I thought of this when I wrote the original code!
BackupClientFileAttributes writes an AttributeType as the first
element. Currently only ATTRIBUTETYPE_GENERIC_UNIX is defined, but the
intention was to extend it with other attribute types as required.
So what you might do is define ATTRIBUTETYPE_WINDOWS, and store
Windows attributes. If you restore on the wrong platform, ignore the
attributes you don't understand.
Windows ACLs will be amusingly complicated by SIDs since account SIDs
will depends on the computer/domain's SID. If you restore to a fresh
install, the ACLs won't make sense without mapping.
Ben