1

I'm trying to unzip a file using gunzip GCF_000746645.1_ASM74664v1_genomic.fna.gz but I get the following error:

gzip: GCF_000746645.1_ASM74664v1_genomic.fna.gz is set-group-ID on execution - ignored

I've learned that set-group-ID on execution refers to something related to permissions on the server, but I'm not entirely sure how so and what I should do. Thanks for the help!

  • Read man -a chmod. What permissions are set on the *.fna.gz file? – waltinator Jan 23 '21 at 00:33
  • Ah I just tried it out and see that I don't have write permissions in this directory. Thank you for the advice. – user452473 Jan 23 '21 at 01:13
  • Just decompress it to stdout: gzip -cd GCF_000746645.1_ASM74664v1_genomic.fna.gz > GCF_000746645.1_ASM74664v1_genomic.fna. –  Jan 23 '21 at 10:50

1 Answers1

0

This is a security mechanism for files with setuid, setgid or sticky bit set. Gzip refuses to compress or decompress files with those permissions and exits with exit status 2 and a warning message.

It doesn't matter if the executable bit is also set in combination with setuid, setgid (s if executable, S if non-executable) or the sticky bit (t if executable, T if non-executable).

Check the permissions with ls -l or stat.

To remove the setgid bit, run

chmod g-s GCF_000746645.1_ASM74664v1_genomic.fna.gz

Related:

Freddy
  • 25,565