xz should warn before overwriting read-only files

Bug #806499 reported by Guy Taylor
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
xz-utils (Ubuntu)
Triaged
Wishlist
Unassigned

Bug Description

running xz --decompress (unxz) on a readonly file will not show any warning before writing over the file and changing the extension.

This is technically expected behaviour but not sympathetic to the end user.

Revision history for this message
Guy Taylor (thebiggerguy) wrote :
description: updated
tags: removed: amd64 running-unity unity-2d
summary: - xz will right over readonly files
+ xz should warn before overwriting read-only files
Revision history for this message
Rolf Leggewie (r0lf) wrote :

Are you still affected? I cannot reproduce this on trusty.

$ echo "test" |xz > /tmp/test.txt.xz
$ chmod uog-rwx /tmp/test.txt.xz
$ unxz /tmp/test.txt.xz

Changed in xz-utils (Ubuntu):
assignee: nobody → Rolf Leggewie (r0lf)
status: New → Incomplete
Revision history for this message
Rolf Leggewie (r0lf) wrote :

OK, I was able to verify it now, made a mistake earlier. I'll let somebody else decide if this is desired behaviour.

Steps to reproduce:
$ echo "test" |xz > /tmp/test.txt.xz
$ chmod 444 /tmp/test.txt.xz
$ unxz /tmp/test.txt.xz
$ ls -la /tmp/test.txt*
-r--r--r-- 1 rolf rolf 5 Jun 4 13:06 /tmp/test.txt

gunzip exhibits the same behaviour, by the way.

Changed in xz-utils (Ubuntu):
assignee: Rolf Leggewie (r0lf) → nobody
status: Incomplete → Triaged
Mathew Hodson (mhodson)
Changed in xz-utils (Ubuntu):
importance: Undecided → Wishlist
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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