Azure Secret Volume中的文件和目录应该是只读的,但具有写权限

问题描述

给出documentation for Azure Secret Volues状态

一旦在容器组中部署了机密,机密卷将是只读的。

我希望密码卷中包含的文件和目录没有写权限。我实际上看到文件和目录具有写权限。我的容器基于Debian。

az container create \
    --resource-group $azResourceGroup \
    --name $azContainer \
    --image $azImage \
    --secrets id_rsa.pub="password" \
    --secrets-mount-path /mnt/ssh \
    '"

我希望id_rsa.pub拥有lr-xr-xr-x的权限,但实际上它具有lrwxrwxrwx

我希望.拥有dr-xr-xr-t的权限,但实际上它具有drwxrwxrwt

vscode@wk-caas-5aefae3309f64d149c62d29e72f18a20-993edee47e7921c0afb5e2:/mnt/ssh$ ls -al
total 4
drwxrwxrwt 3 root root  100 Sep 28 04:21 .
drwxr-xr-x 1 root root 4096 Sep 28 04:21 ..
drwxr-xr-x 2 root root   60 Sep 28 04:21 ..2020_09_28_04_21_11.911187829
lrwxrwxrwx 1 root root   31 Sep 28 04:21 ..data -> ..2020_09_28_04_21_11.911187829
lrwxrwxrwx 1 root root   17 Sep 28 04:21 id_rsa.pub -> ..data/id_rsa.pub

sshd恶魔无法使用AuthorizedKeysFile指向的具有写权限的文件中的密钥进行身份验证。它将失败,并显示以下错误(see here)。

Dec 26 12:30:38 server sshd[3503454]: Authentication refused: bad ownership or modes for directory /home/user/.ssh

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)