[greengrass] What is the set password of ggc_user

0

system: Linux 22.04

set a core device: sudo -S -E java -Droot="/greengrass/v2" -Dlog.store=FILE -jar ./GreengrassInstaller/lib/Greengrass.jar --aws-region us-east-1 --thing-name $sn --thing-group-name *** --component-default-user ggc_user:ggc_group --provision true --setup-system-service true --deploy-dev-tools true

want to do: deploy a component that can copy the contents of the current component to the directory of another user on the device

blocking point: Error will be reported when copying directly without sudo:“permission deny” use sudo -S, error report: "Password input error"

question: What is the set password of "--component-default-user ggc_user:ggc_group"

已提问 1 年前607 查看次数
1 回答
2
已接受的回答

Why are you using -S option for sudo? "read password from standard input"

Just run sudo -E <command>.

The sudo command that you are using will not be running as ggc_user, it will run as root.

I do not understand how your desire "deploy a component that can copy" relates to the problem that you are having. Based on the command that you provided, you haven't yet even installed Greengrass, is that right? So really your desire right now is just to install and provision Greengrass I believe.

To run a component as root, do not use sudo. Update your component recipe to specify RequiresPrivilege. https://docs.aws.amazon.com/greengrass/v2/developerguide/component-recipe-reference.html

For example

Lifecycle:
  Run:
    Script: cp a_to_b b
    RequiresPrivilege: true
AWS
专家
已回答 1 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则