Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] sudo 场景下 nohup 重定向报错 /tmp/nm.nohup.out: Permission denied #1633

Closed
1 of 3 tasks
ZhuoZhuoCrayon opened this issue Jun 27, 2023 · 0 comments
Closed
1 of 3 tasks
Assignees
Labels
done 已上线到正式环境并验收通过

Comments

@ZhuoZhuoCrayon
Copy link
Member

问题描述
sudo 场景下 nohup 重定向报错 /tmp/nm.nohup.out: Permission denied

重现方法

非 root 安装

预期现象
安装继续,而不是超时

原因:输出重定向操作未「sudo」

Permission denied:sudo nohup bash /tmp/setup_proxy.sh &> /tmp/nm.nohup.out &

需要更正为:sudo sh -c "nohup bash /tmp/setup_proxy.sh &> /tmp/nm.nohup.out &"

前者的 sudo 只作用在「&>」前的命令,而 ec-user 用户访问不到「/tmp/nm.nohup.out」

截屏
请提供截屏来解释你的问题,当然这也能更好地帮助我们理解问题。

请提供以下信息

  • bk-nodeman 版本 (发布版本号 或 git tag):
  • 蓝鲸PaaS 版本:
  • bk-nodeman 异常日志:
@ZhuoZhuoCrayon ZhuoZhuoCrayon added backlog 需求初始状态,等待产品进行评估 for test 可以在测试环境进行验收 and removed backlog 需求初始状态,等待产品进行评估 labels Jul 5, 2023
@ZhuoZhuoCrayon ZhuoZhuoCrayon added tested 已经在测试环境验收通过 done 已上线到正式环境并验收通过 and removed for test 可以在测试环境进行验收 tested 已经在测试环境验收通过 labels Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
done 已上线到正式环境并验收通过
Projects
None yet
Development

No branches or pull requests

3 participants