国产服务器KyLinV10操作系统部署harbor仓库时报错:open /etc/registry/passwd: permission denied

 原因:registry容器因为权限问题导致异常重启

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

Appending internal tls trust CA to ca-bundle ...

find: '/etc/harbor/ssl': No such file or directory

Internal tls trust CA appending is Done.

ls: /harbor_cust_cert: Permission denied

time="2024-02-07T04:07:18.071313545Z" level=info msg="debug server listening localhost:5001"

time="2024-02-07T04:07:18.07219485Z" level=info msg="using redis blob descriptor cache" go.version=go1.19.8 instance.id=ddd7db6e-e5ba-42de-8bc1-26655a607aea service=registry version=v2.8.0.m

panic: unable to configure authorization (htpasswd): open /etc/registry/passwd: permission denied

goroutine 1 [running]:

github.com/docker/distribution/registry/handlers.NewApp({0xa71940?, 0x4000483ef0?}, 0x4000101800)

    /go/src/github.com/docker/distribution/registry/handlers/app.go:317 +0x191c

github.com/docker/distribution/registry.NewRegistry({0xa71940?, 0x4000483470?}, 0x4000101800)

    /go/src/github.com/docker/distribution/registry/registry.go:161 +0x128

github.com/docker/distribution/registry.glob..func1(0x8?, {0x4000484730, 0x1, 0x1})

    /go/src/github.com/docker/distribution/registry/registry.go:119 +0x160

github.com/docker/distribution/vendor/github.com/spf13/cobra.(*Command).execute(0xfd3f40, {0x40004846f0?, 0x2?, 0x2?})

    /go/src/github.com/docker/distribution/vendor/github.com/spf13/cobra/command.go:495 +0x3ac

github.com/docker/distribution/vendor/github.com/spf13/cobra.(*Command).Execute(0xfd40e0)

    /go/src/github.com/docker/distribution/vendor/github.com/spf13/cobra/command.go:560 +0x98

解决方式:给予文件权限(harbor由uid gid 10000的用户启动)

1

#在harbor部署目录下找到common目录,在common同级别目录执行

chown -R 10000.10000 ./common

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值