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) => (unassigned) ** Changed in: xz-utils (Ubuntu) Status: Incomplete => Triaged -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to xz-utils in Ubuntu. https://bugs.launchpad.net/bugs/806499 Title: xz should warn before overwriting read-only files Status in xz-utils package in Ubuntu: Triaged 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. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/xz-utils/+bug/806499/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp