[Error] Distrobox fails to install when home directory is on a drive not mounted with "mount" command
- Lenguaje dominante
- Go
- Estrellas
- 13k
- Forks
- 541
- Merge medio
- 20 h 47 min
- PR fusionados (30 d)
- 4
Descripción
#################################################################################
Please, before opening a bug:
- make sure you've read the documentation.
- Ensure there isn't already an open issue about this.
- Ensure there isn't already a closed/resolved issue about this.
**Describe the bug**
Similar to https://github.com/89luca89/distrobox/discussions/2054, I have a secondary internal SSD and attempting to install a distrobox container to a home directory on it will result in the install failing at the "setting up skel" section with the following lines:
```
+ cp /etc/skel/.bash_logout /run/media/liam/9ea32e87-c466-4428-b0d4-6456b441e026/Distros/dev-arch/.bash_logout
cp: cannot stat '/run/media/liam/9ea32e87-c466-4428-b0d4-6456b441e026/Distros/dev-arch/.bash_logout': Permission denied
```
I can create a new container on the same drive without issues, destination folder has the same permissions as the newly created one, external drive is formatted in ext4.
Occurs in current stable and Next git build
**To Reproduce**
Mount a second drive, (either external or internal apparently according to the discussion post)
Attempt to install a distrobox container with the home directory set to one on that drive
**Expected behavior**
Install completes, same as with home on the same drive
**Logs**
Run the commands with `--verbose` and post the log here as a file upload
Attach also the output of `podman logs` or `docker logs`, possibly with `--latest` flag
```
$ distrobox create -i archlinux:latest -I -n testarch -H /run/media/liam/9ea32e87-c466-4428-b0d4-6456b441e026/Distros/testarch
$ distrobox enter testarch
Starting container... [ OK ]
Installing basic packages... [ OK ]
Setting up devpts mounts... [ OK ]
Setting up read-only mounts... [ OK ]
Setting up read-write mounts... [ OK ]
Setting up host's sockets integration... [ OK ]
Integrating host's themes, icons, fonts... [ OK ]
Setting up distrobox profile... [ OK ]
Setting up sudo... [ OK ]
Setting up user's group list... [ OK ]
Setting up skel... Error: An error occurred
$ podman logs --latest
...
...
...
distrobox: Setting up skel...
++ find /etc/skel/ -type f
+ skel_files=$'/etc/skel/.bash_logout\n/etc/skel/.bash_profile\n/etc/skel/.bashrc'
+ for skel_file in ${skel_files}
++ basename /etc/skel/.bash_logout
+ base_file_name=.bash_logout
++ dirname /etc/skel/.bash_logout
+ skel_file_path=/etc/skel
+ file_path_for_home=
+ '[' -n '' ']'
+ '[' '!' -f /run/media/liam/9ea32e87-c466-4428-b0d4-6456b441e026/Distros/testarch/.bash_logout ']'
+ '[' '!' -L /run/media/liam/9ea32e87-c466-4428-b0d4-6456b441e026/Distros/testarch/.bash_logout ']'
+ cp /etc/skel/.bash_logout /run/media/liam/9ea32e87-c466-4428-b0d4-6456b441e026/Distros/testarch/.bash_logout
cp: cannot stat '/run/media/liam/9ea32e87-c466-4428-b0d4-6456b441e026/Distros/testarch/.bash_logout': Permission denied
+ '[' 1 -ne 0 ']'
+ printf 'Error: An error occurred\n'
Error: An error occurred
```
**Desktop (please complete the following information):**
- Are you using podman, docker or lilipod?
Podman
- Which version or podman, docker or lilipod?
podman version 6.1.1
- Which version of distrobox?
distrobox: 1.8.2.5
and latest next build
- Which host distribution?
Arch Linux 7.2.4-arch1-2
- How did you install distrobox?
pacman
and sudo make install perhttps://github.com/89luca89/distrobox/blob/next/docs/posts/announcing_distrobox_next.md instructions
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.