[Error] Directories in home directory have root owner
- 主要語言
- Go
- 星號
- 13k
- 分支
- 541
- 平均合併
- 20 小時 47 分鐘
- 30 天內合併 PR
- 4
描述
**Describe the bug**
When running this script,
```sh
#!/usr/bin/env sh
mkdir testbox
distrobox create \
--yes \
--image quay.io/toolbx/arch-toolbox:latest \
--name testbox \
--home "$PWD/testbox" \
--init \
--additional-packages "systemd" \
--verbose &> create-log.txt
distrobox enter --verbose testbox -- ls testbox/.config &> enter-log.txt
```
the bottom command outputs this
```
ls: cannot open directory 'testbox/.config': Permission denied
```
because these directories have root as their user (instead of me).
```
drwx------ 1 root root 8 Mar 7 03:54 .cache
drwx------ 1 root root 8 Mar 7 03:54 .config
drwx------ 1 root root 10 Mar 7 03:54 .local
```
**To Reproduce**
Run the script above.
**Expected behavior**
The directories listed above should have a non-root user.
**Logs**
[create-log.txt](https://github.com/user-attachments/files/25811044/create-log.txt)
[enter-log.txt](https://github.com/user-attachments/files/25811043/enter-log.txt)
**Desktop (please complete the following information):**
- Are you using podman, docker or lilipod? **Podman**
- Which version or podman, docker or lilipod? **5.7.1**
- Which version of distrobox? **1.8.2.3**
- Which host distribution? **Bazzite DX Nvidia (no layering)**
- How did you install distrobox? **Came with distro**
**Additional context**
I tried this with Bluefin DX (no Nvidia) with Distrobox version 1.8.2.4, and it has this same issue.
貢獻指南
研究方向
這個 issue 涉及使用自訂 home 目錄時的目錄擁有權。查看命令 distrobox create 對 --home 旗標的處理,可能位於 distrobox 的主要腳本中。檢查使用者 ID 如何進行對映,以及目錄如何建立。使用提供的腳本重現這個 bug,然後檢查日誌以查看各個步驟。修正將涉及確保目錄以正確的使用者擁有權建立,可能需要調整容器 entrypoint 或目錄設定。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- bash, docker, linux, shell
- 領域
- cli, developer-experience
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 描述清楚
- 新手友好度
- 55/100