pbzip2 fails to preserve ownership on 0 length files

Bug #1011021 reported by Jeff Gilchrist
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
pbzip2
Fix Released
Medium
Yavor Nikolov

Bug Description

This bug was reported via Debian bug system by Mike Ashton <email address hidden>:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=658239

pbzip2, when run as root, does not preserve the user and group ownership of the source file on the newly created .bz2 file if the source file is zero length.

This is inconsistent with its behaviour in lenny, but worse it is inconsistent with bzip2 itself for which it should be a drop in replacement.

This may seem trivial (it's a weird edge case, I'll grant you), but it just broke a lot of cron jobs following a dist-upgrade :)

wilson:~# : >test1
wilson:~# : >test2
wilson:~# chown mike test?
wilson:~# pbzip2 test1
wilson:~# bzip2 test2
wilson:~# ls -l test?.bz2
-rw-r--r-- 1 root root 14 Feb 1 11:19 test1.bz2
-rw-r--r-- 1 mike root 14 Feb 1 11:18 test2.bz2

Changed in pbzip2:
status: New → Confirmed
Changed in pbzip2:
assignee: nobody → Yavor Nikolov (yavor-nikolov)
importance: Undecided → Medium
Revision history for this message
Yavor Nikolov (yavor-nikolov) wrote :

I just commited a patch on my private branch (lp:~yavor-nikolov/pbzip2/bug-1011021-owner-not-prezerved-on-0-files). I'll merge it into a new release soon.

Changed in pbzip2:
status: Confirmed → Fix Committed
status: Fix Committed → In Progress
Changed in pbzip2:
milestone: none → 1.1.8
Changed in pbzip2:
status: In Progress → Fix Committed
Changed in pbzip2:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.