1 回答
- 最新
- 投票最多
- 评论最多
0
【以下的回答经过翻译处理】 你为什么要使用-S
选项来运行sudo呢?“read password from standard input”
只需运行sudo -E <命令>
即可。
你使用的sudo命令将不会作为ggc_user运行,而是作为root运行。
我不明白你的“部署一个可以复制的组件”的需求与你遇到的问题有什么关系。根据你提供的命令,你甚至还没有安装Greengrass,是吗?因此,你现在真正的需求只是安装和配置Greengrass。
要以root身份运行组件,请勿使用sudo。更新你的component recipe以指定RequiresPrivilege
。https://docs.aws.amazon.com/greengrass/v2/developerguide/component-recipe-reference.html
例如
Lifecycle:
Run:
Script: cp a_to_b b
RequiresPrivilege: true
相关内容
- AWS 官方已更新 1 年前