[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#62695: Gzip error

From: Petr Pisar
Subject: bug#62695: Gzip error
Date: Fri, 7 Apr 2023 06:52:48 +0200

V Thu, Apr 06, 2023 at 09:25:50AM +0000, Mary-Anne Freckleton via GNU gzip 
discussion and bug reports. napsal(a):
> I am trying to gzip some files; however, I keep getting the error message

The message is:

$ gzip FILE_NAME
gzip: FILE_NAME.gz: Operation not permitted

The cause it that you don't have a permission for writing into the directory
where gzip tries to create the FILE_NAME.gz archive.

Linux has a great tool for tracing what system calls programs do and that
shows it:

$ strace -- gzip sauer_client 
execve("/bin/gzip", ["gzip", "sauer_client"], 0x7ffe4c58d4e0 /* 75 vars */) = 0
openat(3, "sauer_client.gz", O_WRONLY|O_CREAT|O_EXCL, 0600) = -1 EACCES 
(Operace zamítnuta)
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
write(2, "gzip: ", 6gzip: )                   = 6
write(2, "sauer_client.gz: Permission deni"..., 35sauer_client.gz: Permission 
) = 35

You can use "ls -ld ." command to see the permission bits of your current
working directory.

> displayed below in the screenshot.

Next time, please, instead of a screenshot which consumes 10 MB, simply copy
and paste the text from your terminal.

> We have all of the text files in a folder
> and are not sure what we’re doing wrong (as we’ve never seen this issue
> before).

I agree the error message is not the best. Gzip might change the message to
express what operation (opening a file for writing) failed.

-- Petr

Attachment: signature.asc
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]