【发布时间】:2019-12-14 12:05:54
【问题描述】:
我有与以下链接类似的问题,但在 powershell 中,因为我在 Windows 10 中运行 clickhouse docker 容器。
Data directory permissions on host for Clickhouse installation via docker
我的设置是这样运行的:
docker run -d -p 8124:8124 --name my_database --ulimit nofile=262144:262144 --volume=E:/:/var/lib/clickhouse yandex/clickhouse-server
E 驱动器是我的 windows 计算机上的驱动器之一。
在运行合并树表创建时,我似乎无法访问 /var/lib/clickhouse/data。似乎 clickhouse 客户端没有获得足够的权限来访问此文件系统。错误如下所示:
Access to file denied: /var/lib/clickhouse/data/default/test_mergetree/tmp_insert_20150731_20150731_8_8_0
由于我在 powershell 中,我不确定如何解决这个问题。我正在尝试访问文件系统以授予 powershell 权限:
类似的东西
ICACLS "var/lib/clickhouse/data" /setowner "administrator"
但是由于 clickhouse 被 dockerized 似乎我找不到路径:
The system cannot find the path specified.
我必须运行 docker compose 吗?还是我以错误的方式处理这个问题?
尝试 1
我已尝试运行以下命令:
docker run --rm -i --entrypoint /bin/sh yandex/clickhouse-server -c id clickhouse
#got back:
uid=0(root) gid=0(root) groups=0(root)
#went into the system and ran
docker exec -it container-id bash
chown -R 0:0 /var/lib/clickhouse
#got back
chown: cannot read directory '/var/lib/clickhouse/System Volume Information': Permission denied
【问题讨论】:
标签: windows powershell docker clickhouse