[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: --delete action prints "Bad file descriptor" due to insufficient pri
From: |
Maxim Cournoyer |
Subject: |
Re: --delete action prints "Bad file descriptor" due to insufficient privilege |
Date: |
Sun, 05 Feb 2023 20:24:33 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
Hi!
Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:
> Hi,
>
> "Sergey Poznyakoff" <gray@gnu.org.ua> writes:
>
>> Hi Maxim,
>>
>> I cannot reproduce this with the recent version of tar (1.34). FWIW,
>> tar 1.29 is working fine as well. What version are you using?
>
> I used tar 1.34 as packaged in GNU Guix.
Thanks for going to lengths to try reproducing this. I tried it again,
and in the end it was the directory I was working on that is lacking
write permissions:
--8<---------------cut here---------------start------------->8---
maxim@hurd /tmp/sandbox$ ls -al
total 0
dr-xr-xr-x 1 maxim users 0 Feb 2 23:15 ./
drwxr-xr-x 1 maxim users 4264 Feb 5 19:39 ../
--8<---------------cut here---------------end--------------->8---
So, this should reproduce it on your side:
--8<---------------cut here---------------start------------->8---
mkdir /tmp/sandbox \
&& cp tar-pack.tar /tmp/sandbox \
&& chmod 555 /tmp/sandbox \
&& cd /tmp/sandbox \
&& tar -f tar-pack.tar --delete './var/guix/db/db.sqlite'
tar: tar-pack.tar: Cannot read: Bad file descriptor
tar: At beginning of tape, quitting now
tar: Error is not recoverable: exiting now
--8<---------------cut here---------------end--------------->8---
I'm a bit puzzled how I got /tmp/sandbox into this odd permission;
perhaps due to my experiments extracting various tarballs containing
read-only, root-owned contents.
--
Thanks,
Maxim