-
Notifications
You must be signed in to change notification settings - Fork 277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
为什么aria2下载的文件都是root权限 #44
Comments
因为这个镜像里面执行程序的用户就是root用户。
…On Sat, 18 Aug 2018 at 10:52 pm, bigdream ***@***.***> wrote:
[image: default]
<https://user-images.githubusercontent.com/20846732/44299447-8fb7b200-a328-11e8-9d51-d784e5111a6d.PNG>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#44>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAzD4Mpnb0D68Q1z_GG1lHPT7rEpqjHIks5uSA38gaJpZM4WCjv0>
.
|
这样我aria2下载的文件只有可读的权限了,没法删除 |
容器外面的用户和容器里面的用户是不一样的。容器里面可以使用非root用户,但是并不能使用你当前宿主机的用户(非root)。
我不认为在你不使用root用户运行docker的情况下,我改变了容器内用户为非root用户能解决问题。
建议目前使用root用户来运行docker本身
或者你也可以尝试修改docker-compose.yml,为 aria2 service添加privileged属性,以获取 root 权限
aria2:
image: wahyd4/aria2-ui:nextcloud
privileged: true
…On Sat, 18 Aug 2018 at 10:56 pm, bigdream ***@***.***> wrote:
这样我aria2下载的文件只有可读的权限了,没法删除
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#44 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAzD4GF_bXY_OuJra9g4PTCm8igH-cDxks5uSA7ygaJpZM4WCjv0>
.
|
确实是使用root用户登录的,只不过是aria2下载的文件是root才有写的权限,但是nextcloud只有991的权限,使得aria2下载的文件只有读没有写的权限 |
不太理解你说的 使用 root 用户不能删除文件的权限的问题应该已经解决了。 |
你这个 nextcloud 是什么目录? 991 是用户 ID 和用户组 ID 吧,不是权限。 是你宿主机自己设置的,还是被容器创建的? |
我查看了以下#38用的是官方的nextCloud,#39又切换回去了 |
是,现在是用的第三方做的镜像,因为官方镜像,在启动时,需要下载几十M的文件,导致在国内很可能下载启动不成功。
但是这个和权限没啥关系,主要是之前我没有对目录手动添加rw权限导致的
…On Sun, 19 Aug 2018 at 12:30 am, bigdream ***@***.***> wrote:
我查看了以下#38用的是官方的nextCloud,#39又切换回去了
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#44 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAzD4F0MmgEhiIQhSehmubjLOHfwfE1Xks5uSCUVgaJpZM4WCjv0>
.
|
nextcloud 是被容器创建的目录,创建开始是root权限,进入网页之后更新为991权限, |
刚查了 Nextcloud 镜像的文档, 991是他们默认设置的用户ID 和用户组 ID, 是可以通过环境变量覆盖的。修改 docker-compose.yml 中,nextcloud 镜像里面的参数即可 environment:
- UID=
- GID= 就可以手动绑定,让容器和宿主机运行于同样的用户了。 |
The text was updated successfully, but these errors were encountered: