AlistGo / AlistGo/alist

`xhofe/alist-aria2`镜像使用非root用户时aria2有目录权限问题

未关闭
#7,296 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
bug
主要语言
Go
星标
50.2k
派生
7.9k
平均合并
7 天 21 小时
30 天内合并 PR
6

描述

### Please make sure of the following things

- [X] I have read the [documentation](https://alist.nn.ci).
我已经阅读了[文档](https://alist.nn.ci)。

- [X] I'm sure there are no duplicate issues or discussions.
我确定没有重复的issue或讨论。

- [X] I'm sure it's due to `AList` and not something else(such as [Network](https://alist.nn.ci/faq/howto.html#tls-handshake-timeout-read-connection-reset-by-peer-dns-lookup-failed-connect-connection-refused-client-timeout-exceeded-while-awaiting-headers-no-such-host) ,`Dependencies` or `Operational`).
我确定是`AList`的问题,而不是其他原因(例如[网络](https://alist.nn.ci/zh/faq/howto.html#tls-handshake-timeout-read-connection-reset-by-peer-dns-lookup-failed-connect-connection-refused-client-timeout-exceeded-while-awaiting-headers-no-such-host),`依赖`或`操作`)。

- [X] I'm sure this issue is not fixed in the latest version.
我确定这个问题在最新版本中没有被修复。

### AList Version / AList 版本

v3.37.4

### Driver used / 使用的存储驱动

N.A

### Describe the bug / 问题描述

`xhofe/alist-aria2` 镜像使用非 root 用户时 aria2 有目录权限问题

如果用 PUID 和 PGID 环境变量指定非 root 用户的 UID 和 GID,`entrypoint.sh` 里面启动 aria2 的命令会报错,aria2 无法正常启动。

这里因为 aria2 需要读写 `/root` 目录,默认情况下其它用户没有访问权限。
可以在 Dockfile 里面用以下命令授权。
```
chmod a+x /root
chmod -R a+r,a+w /root/.aria2c
```

### Reproduction / 复现链接

N.A

### Config / 配置

N.A

### Logs / 日志

_No response_

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。