mirror of
https://github.com/wahyd4/aria2-ariang-x-docker-compose.git
synced 2026-08-08 21:00:46 +10:00
#58 Use the official docker image to solve the no permission to upload files issue, also update readme about how to solve the issue
This commit is contained in:
+9
-15
@@ -19,21 +19,15 @@
|
||||

|
||||
|
||||
## 注意:
|
||||
***非常重要***
|
||||
|
||||
很多童鞋在 issue 里面提到了说,不能上传文件的问题。的确,我之前主要是在 Mac 下进行开发和调试没有这个问题,刚刚在 Centos 下经过测试却有这个问题,Nextcloud Github 上面也有一个[相关问题](https://github.com/nextcloud/docker/issues/229),目前暂时没有解决。
|
||||
很多童鞋在 issue 里面提到了说,不能上传文件的问题。页面提示: `You don’t have permission to upload or create files here`
|
||||
|
||||
被 Nextcloud 管理的目录,用户叫`www-data`,Nextcloud 内所有文件的所有权都属于`www-data`,而我们新添加的目录`abc` 则是属于`root`用户。我们需要赋予`www-data` 用户读写我们需要绑定的目录的权限。
|
||||
|
||||
```
|
||||
sudo chown -R www-data </abc> #<>这里是你需要修改的目录
|
||||
```
|
||||
如果已经添加了`External Storage`,请从`External Storage`移除该条目录,然后再重新添加该目录,就没问题啦!如果依然还有问题,请回来报告Issue。
|
||||
|
||||
通过查看 Nextcloud 容器内部的文件(docke exec -it 该容器id sh)发现:
|
||||
```bash
|
||||
drwxr-xr-x 2 root root 4096 Mar 17 21:47 abc
|
||||
drwxr-xr-x 2 991 991 4096 Mar 17 21:27 apps2
|
||||
drwxr-xr-x 1 root root 4096 Feb 10 13:31 bin
|
||||
drwxr-xr-x 2 991 991 4096 Mar 17 21:27 config
|
||||
drwxrwx--- 6 991 991 4096 Mar 17 21:50 data
|
||||
```
|
||||
被 Nextcloud 管理的目录,用户叫`991`,我们是用权限访问和上传该目录的,而我们新添加的目录`abc` 则是属于`root`用户。可以尝试下面的命令行
|
||||
```
|
||||
sudo chown -R 991 /abc #这里是你需要修改的目录
|
||||
```
|
||||
即是把该目录所有者修改成 Nextcloud 的用户,无须重启,再次尝试在浏览器里面上传文件,即可成功了。
|
||||
|
||||
如果遇到页面右上角显示`You don’t have permission to upload or create files here` 请忽略即可。
|
||||
|
||||
@@ -2,9 +2,9 @@ version: '2'
|
||||
|
||||
services:
|
||||
nextcloud:
|
||||
image: wonderfall/nextcloud
|
||||
image: nextcloud:latest
|
||||
volumes:
|
||||
- ./data/nextcloud:/data:rw
|
||||
- ./data/nextcloud:/var/www/html:rw
|
||||
- ./data:/user-files:rw
|
||||
restart: always
|
||||
aria2:
|
||||
|
||||
Reference in New Issue
Block a user