$ ls -ld . passwd drwxrwxrwx. 2 eggert eggert 60 Aug 7 14:01 . -rw-rw-r--. 1 eggert news 5400 Aug 7 13:54 passwd $ sudo -u news gzip passwd $ ls -ld . passwd.gz drwxrwxrwx. 2 eggert eggert 60 Aug 7 14:01 . -rw-rw-r--. 1 news news 2134 Aug 7 13:54 passwd.gz
gzip's old way had a security hole. I don't observe any problem with
gzip 1.6 on Fedora 20 (see below); maybe there was a bug in gzip 1.3.12
that's been fixed, or maybe your OS has special restrictions, or
something. You might try upgrading to 1.6, or if that doesn't work try
running 'strace gzip' rather than 'gzip' to see exactly what's failing.
- bug#18216: Issue with chmod and chown in gzip.c? Frédéric Castelain
- bug#18216: Issue with chmod and chown in gzip.c? Paul Eggert
- bug#18216: Issue with chmod and chown in gzip.c? Paul Eggert