distrobox icon indicating copy to clipboard operation
distrobox copied to clipboard

[Error] Distrobox has problems with home directories as soft links pointing to directories in parent directory

Open mogoh opened this issue 2 years ago • 3 comments

Describe the bug

If I set the the home directory and that path cointains a soft link to another directory and the linked diretory is in a parent directory of the soft link, than distrobox can not start the container.

Sounds complicated, but please just see the steps to reproduce.

To Reproduce

Here are the steps to reproduce:

cd /home
sudo mkdir temp
sudo chown mogoh:mogoh temp/
cd ~
ln -s /home/temp temp
cd temp
distrobox create --image docker.io/library/archlinux:latest --name name-temp --home $(pwd)
Creating 'name-temp' using image docker.io/library/archlinux:latest      [ OK ]
Distrobox 'name-temp' successfully created.
To enter, run:

distrobox enter name-temp

name-temp
distrobox enter name-temp
Container name-temp is not running.
Starting container name-temp
run this command to follow along:

 podman logs -f name-temp

Error: unable to start container "6362758b2bd5c257e2c5d1df344a088a2d4937e2113821afa2de7fcd04e703cf": openat2 `home/mogoh/temp`: No such file or directory: OCI runtime attempted to invoke a command that was not found

Expected behavior

Not to crash

Logs

distrobox create --verbose

https://pastebin.com/raw/HXLwTuy9

distrobox enter --verbose

https://pastebin.com/raw/Aiyg5fMp

podman logs name-temp

empty

Desktop (please complete the following information):

Are you using podman or docker?

podman

Which version or podman or docker?

podman --version
podman version 3.4.4

Which version of distrobox?

distrobox --version
distrobox: 1.4.2.1

mogoh avatar Feb 16 '23 22:02 mogoh

I have the same problem, I have tried with docker and podman.

sudo podman logs -f ubuntu

Error: unable to start container "124fcd347448623f48febd50c5aaa5e47d40808f25eea30c34e8a17a5d7e63bb": error stat'ing file `/home/cantalupo/distrobox/distrobox-host-exec`: No such file or directory: OCI runtime attempted to invoke a command that was not found
 sudo docker logs -f ubuntu

 Error: could not start entrypoint.
exec /usr/bin/entrypoint: no such file or directory

cantalupo555 avatar Feb 19 '23 01:02 cantalupo555

Same error. Trying to install distrobox on linked folder, but it gives the same error:

Container fedorawebdev is not running.
Starting container fedorawebdev
run this command to follow along:

 podman logs -f fedorawebdev

Error: unable to start container "5a94c7fe570332035a0dcc6b0e288f50ddc2e7d39aa94666334b184fce0debb5": crun: openat2 `home/cyberfrogg/.distrobox/fedorawebdev`: No such file or directory: OCI runtime attempted to invoke a command that was not found

cyberfrogg avatar Feb 19 '23 21:02 cyberfrogg

Same thing, but i noticed that if i create link on the same disk (basically in the same folder as source of the link), it will work. It won't work with links to external drive for some reason

Meister1593 avatar Feb 19 '23 21:02 Meister1593

Hi @mogoh @Meister1593 this is podman that is not able to resolve the symlinks, ad you see that is a podman error, not a distrobox one

89luca89 avatar Feb 19 '24 21:02 89luca89