Bug 156959 - invalid file mode on created files
invalid file mode on created files
Product: Fedora
Classification: Fedora
Component: unzip (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Ivana Varekova
Ben Levenson
: Regression, Reopened
Depends On:
  Show dependency treegraph
Reported: 2005-05-05 13:43 EDT by Arne de Bruijn
Modified: 2008-06-12 04:24 EDT (History)
1 user (show)

See Also:
Fixed In Version: unzip-5.52-5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-06-12 04:24:12 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
last patch in spec file fixes problem (803 bytes, patch)
2008-05-22 16:42 EDT, James M. Leddy
no flags Details | Diff
new srpm (1.11 MB, application/x-rpm)
2008-05-22 16:46 EDT, James M. Leddy
no flags Details

  None (edit)
Description Arne de Bruijn 2005-05-05 13:43:22 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.7) Gecko/20050414 Firefox/1.0.3

Description of problem:
Files are created with an invalid file mode, because the open(..., O_CREAT) call on unzip-5.51-near-4GB.patch line 140 contains no file mode argument. This doesn't seem to cause problems on ext3 (and probably other unix file systems), but does on cifs filesystems.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. mount -t cifs //host/share /mnt/cifs
2. cd /mnt/cifs
3. unzip /tmp/file.zip

Actual Results:  Error message from unzip:
file.ext:  write error (disk full?).  Continue? (y/n/^C)

Expected Results:  Successful extraction.

Additional info:
Comment 1 Ivana Varekova 2005-05-06 05:21:46 EDT
can you add mode to open command 
(change unzip-5.51-near-4GB.patch line 140 
- fd = open(G.filename, O_WRONLY | O_LARGEFILE | O_CREAT); 
+ fd = open(G.filename, O_WRONLY | O_LARGEFILE | O_CREAT | O_EXCL | 0600) ;
and test whether is the bug still present.
If there is any problem I can create changed package and attach it here.
Comment 2 Arne de Bruijn 2005-05-06 10:06:03 EDT
I changed line 140 of unzip-5.51-near-4GB.patch to
 fd = open(G.filename, O_WRONLY | O_LARGEFILE | O_CREAT, 0666);
and that fixed the bug.
Comment 3 Ivana Varekova 2005-05-09 03:55:52 EDT
This problem is fixed in unzip-5.51-11. (I use mode 0600.) If there is any
problem please reopen this bug.
Ivana Varekova
Comment 4 James M. Leddy 2008-05-14 15:52:06 EDT
Problem has reappeared in unzip-5.52 both version in F8 and RHEL, presumably f9
as well.  

see bug 227225
Comment 5 John Poelstra 2008-05-19 22:56:34 EDT
We do not keep bugs open against EOL versions of Fedora.  Per comment #4
changing version to '8'
Comment 6 James M. Leddy 2008-05-22 16:42:47 EDT
Created attachment 306422 [details]
last patch in spec file fixes problem

Very well.  I've attached a patch and src.rpm of the latest version. 
Alternatively just edit unzip-5.52-near-4GB.patch as described above.
Comment 7 James M. Leddy 2008-05-22 16:46:11 EDT
Created attachment 306423 [details]
new srpm
Comment 8 Ivana Varekova 2008-06-12 04:24:12 EDT
Thanks, this bug is fixed in  unzip-5.52-5 version.

Note You need to log in before you can comment on or make changes to this bug.