Bug 162189 - FreeBSD unzip does not restore file permissions properly
Summary: FreeBSD unzip does not restore file permissions properly
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 9.0-BETA3
Hardware: Any Any
: Normal Affects Only Me
Assignee: Tim Kientzle
Depends on:
Reported: 2011-10-31 09:40 UTC by clbuisson
Modified: 2018-02-18 07:54 UTC (History)
2 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description clbuisson 2011-10-31 09:40:08 UTC
When unzipping an archive, the file permissions are not restored properly (but they are by unzip from ports). More precisely the execute bit seems to be set
unconditionnally for non executable files.


use the following workarounds:

1- delete the /usr/sbin/unzip executable.

2- create an alias and modify shells/perl/.. scripts to force use of port unzip.
How-To-Repeat: create a zip archive, unzip it and compare.
Comment 1 Tim Kientzle freebsd_committer 2011-11-17 04:54:55 UTC
Responsible Changed
From-To: freebsd-bugs->kientzle

This is a libarchive issue.
Comment 2 Dag-Erling Smørgrav freebsd_committer 2015-10-09 13:07:49 UTC
This is an issue in libarchive, see https://github.com/libarchive/libarchive
Comment 3 Alex Kozlov freebsd_committer 2018-02-18 07:54:46 UTC
Fixed in all supported versions of FreeBSD.