Podman Issue with tar in Pop-OS! 22

2 min read
I got a problem with tar inside podman
The problem
podman run -v $HOME:/mnt:Z -it --rm debian:trixie bash
root@9d22f8d85816:/# cd /mnt/Documents/
root@9d22f8d85816:/mnt/Documents# apt update
root@9d22f8d85816:/mnt/Documents# apt install wget
root@9d22f8d85816:/mnt/Documents# wget https://download.netsurf-browser.org/netsurf/releases/source-full/netsurf-all-3.11.tar.gz
tar: netsurf-all-3.11/netsurf/frontends/beos/res/credits.html: Cannot change mode to rwxrwxrwx: Operation not permitted
tar: netsurf-all-3.11/netsurf/frontends/beos/res/licence.html: Cannot change mode to rwxrwxrwx: Operation not permitted
tar: netsurf-all-3.11/netsurf/frontends/beos/res/welcome.html: Cannot change mode to rwxrwxrwx: Operation not permitted
tar: netsurf-all-3.11/netsurf/frontends/framebuffer/res/Messages: Cannot change mode to rwxrwxrwx: Operation not permitted
...
These errors are coming from symlinks, which podman unable to change file mode permission.
The solution
It was pointed by this comment
https://github.com/microsoft/vscode-remote-release/issues/11042#issuecomment-3044713731
Let's check on our crun
in host system:
pop-os@pop-os:~$ sudo -i
root@pop-os:~# crun --version
crun version 0.17
Yep, it's too old, we need to update it manually from https://github.com/containers/crun/releases/tag/1.23.1:
root@pop-os:~# wget https://github.com/containers/crun/releases/download/1.23.1/crun-1.23.1-linux-amd64
root@pop-os:~# chmod +x crun-1.23.1-linux-amd64
root@pop-os:~# ./crun-1.23.1-linux-amd64 --version
crun version 1.23.1
commit: d20b23dba05e822b93b82f2f34fd5dada433e0c2
rundir: /run/crun
spec: 1.0.0
+SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +YAJL
root@pop-os:~# mv /usr/bin/crun /usr/bin/crun.old
root@pop-os:~# mv ./crun-1.23.1-linux-amd64 /usr/bin/crun
root@pop-os:~# crun --version
crun version 1.23.1
commit: d20b23dba05e822b93b82f2f34fd5dada433e0c2
rundir: /run/crun
spec: 1.0.0
+SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +YAJL
root@pop-os:~# exit
logout
Now let's try it:
pop-os@pop-os:~$ podman run -v $HOME:/mnt:Z -it --rm debian:trixie bash
root@0ef97237a0c0:/# cd /mnt/Documents/
root@0ef97237a0c0:/mnt/Documents# tar -xf netsurf-all-3.11.tar.gz
root@0ef97237a0c0:/mnt/Documents# ls netsurf-all-3.11/
ChangeLog.md README.md libcss libhubbub libnsfb libnslog libnsutils libpencil librufl libutf8proc netsurf
Makefile buildsystem libdom libnsbmp libnsgif libnspsl libparserutils librosprite libsvgtiny libwapcaplet nsgenbind
root@0ef97237a0c0:/mnt/Documents#
It works!
0
Subscribe to my newsletter
Read articles from Wildan M directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
