Mail Archives: cygwin/2004/04/27/07:35:23
Dick Repasky schrieb:
> Second question: how can I backup facls as part of a tar backup and
> restore them?
Below some results for: zip, rar, pax, tar, cpio
CYGWIN="ntsec tty server=1 ntea"
I didn't test how they store the uid/username resp. gid/groupname.
As number or as string? With rsync you can control that, but no ACL's.
* ZIP / UNZIP (yes)
cygwin zip does not offer the -! (use privileges (if granted) to obtain
all aspects of WinNT security), the native windows versions does.
cygwin unzip does offer the -X (restore UID/GID info) command line
option, but only native unzip offers the true
-X restore ACLs and better -XX => use privileges option.
get the zip copies from a infozip mirror instead. non-us mirrors also
carry the encryption. such as http://www.info-zip.org/pub/infozip/
$ /cygdrive/u/ZIP/zip-crypt-2.32/zip -h
Copyright (C) 1990-1999 Info-ZIP
Type 'zip "-L"' for software license.
Zip 2.3 (November 29th 1999). Usage:
zip [-options] [-b path] [-t mmddyyyy] [-n suffixes] [zipfile list]
[-xi list]
The default action is to add or replace zipfile entries from list, which
can include the special name - to compress standard input.
If zipfile and list are omitted, zip compresses stdin to stdout.
-f freshen: only changed files -u update: only changed or new files
-d delete entries in zipfile -m move into zipfile (delete files)
-r recurse into directories -j junk (don't record) directory names
-0 store only -l convert LF to CR LF (-ll CR LF to LF)
-1 compress faster -9 compress better
-q quiet operation -v verbose operation/print version info
-c add one-line comments -z add zipfile comment
-@ read names from stdin -o make zipfile as old as latest entry
-x exclude the following names -i include only the following names
-F fix zipfile (-FF try harder) -D do not add directory entries
-A adjust self-extracting exe -J junk zipfile prefix (unzipsfx)
-T test zipfile integrity -X eXclude eXtra file attributes
-! use privileges (if granted) to obtain all aspects of WinNT security
-R PKZIP recursion (see manual)
-$ include volume label -S include system and hidden files
-e encrypt -n don't compress these suffixes
$ /usr/bin/zip -h
Copyright (C) 1990-1999 Info-ZIP
Type 'zip "-L"' for software license.
Zip 2.3 (November 29th 1999). Usage:
zip [-options] [-b path] [-t mmddyyyy] [-n suffixes] [zipfile list]
[-xi list]
The default action is to add or replace zipfile entries from list, which
can include the special name - to compress standard input.
If zipfile and list are omitted, zip compresses stdin to stdout.
-f freshen: only changed files -u update: only changed or new files
-d delete entries in zipfile -m move into zipfile (delete files)
-r recurse into directories -j junk (don't record) directory names
-0 store only -l convert LF to CR LF (-ll CR LF to LF)
-1 compress faster -9 compress better
-q quiet operation -v verbose operation/print version info
-c add one-line comments -z add zipfile comment
-@ read names from stdin -o make zipfile as old as latest entry
-x exclude the following names -i include only the following names
-F fix zipfile (-FF try harder) -D do not add directory entries
-A adjust self-extracting exe -J junk zipfile prefix (unzipsfx)
-T test zipfile integrity -X eXclude eXtra file attributes
-y store symbolic links as the link instead of the referenced file
-R PKZIP recursion (see manual)
-e encrypt -n don't compress these suffixes
tests with native zip -! / unzip -XX optained identical facl's.
native unzip -X alone was mangled by different parent directory ACL masks.
Attention: cygwin unzip -XX was the same as native unzip -X,
so it silently dropped the XX and didn't restore the mask and gid's.
* RAR / UNRAR (no)
native rar / unrar offer the -ow switch (Save or restore file owner and
group)
but after unrar x -ow the directory mask did override the group
membership, and the mask was just the default one.
* PAX (yes)
I have a native pax which preserves ACL's.
I didn't see a cygwin pax yet, but didn't look for it. And I wouldn't
trust it too much.
See also http://acl.bestbits.at/pipermail/acl-devel/2000-October/000389.html
* TAR (no)
solaris tar should do it with -p
"Restore the named files to their original modes, and
ACLs if applicable, ignoring the present umask(1).
This is the default behavior if invoked as super-user
with the x function letter specified. If super-user,
SETUID and sticky information are also extracted, and
files are restored with their original owners and per-
missions, rather than owned by root. When this func-
tion modifier is used with the c function, ACLs are
created in the tarfile along with other information.
Errors will occur when a tarfile with ACLs is extracted
by previous versions of tar."
However cygwin tar -p preserves the mask, ignores the umask,
but does not preserve the gid and any special ACL is dropped.
* CPIO (no)
With the Solaris cpio, the corresponding option is `-P',
that has no meaning in gnu cpio:
-P Preserve ACLs. If the option is used for
output, ACLs if existed are written along
with other attributes to the standard output.
ACLs are created as special files with a spe-
cial file type. If the option is used for
input, ACLs if existed are extracted along
with other attributes from standard input.
The option recognizes the special file type.
Note that errors will occur if a cpio archive
with ACLs is extracted by previous versions
of cpio. This option should not be used with
the -c option, as ACL support may not be
present on all systems, and hence is not
portable. Use ASCII headers for portability.
unimplemented in cygwin (gnu) cpio
--
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -