Skip to content

Commit

Permalink
Update the documentation for 'unpack' to explain about how permission…
Browse files Browse the repository at this point in the history
…s are handled (including the --copy-permissions option).
  • Loading branch information
pjbriggs committed Feb 7, 2025
1 parent f1f2201 commit 3742fd5
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -412,15 +412,20 @@ directory with the same name will not be overwritten.
The restored archive contents are also verified using
their original checksums as part of the unpacking.

The timestamps and permissions of the contents are
also restored (with the caveat that all restored
content will have read-write permission added for the
user unpacking the archive, regardless of the
permissions of the original files).

Ownership information is not restored (unless the
archiving and unpacking operations are both performed
by superuser).
In addition the timestamps of the unpacked files and
directories are also restored to those from the source
directory; by default permissions are not restored,
instead they be the default permissions for the user
unpacking the archive (read-write permission will also
be added). This mimicks the default behaviour of the
``tar`` utility when unpacking ``.tar.gz`` archives.

The ``--copy-permissions`` option can be specified to
force the permissions to also be restored. Note that
this can produce undesirable results depending on the
permissions on the source directory.

Ownership information is not restored.

If only a subset of files need to be restored from
the archive then the ``extract`` command is recommended
Expand Down

0 comments on commit 3742fd5

Please sign in to comment.