码迷,mamicode.com
首页 > 系统相关 > 详细

Linux指定用户运行程序

时间:2019-12-08 00:54:57      阅读:118      评论:0      收藏:0      [点我收藏+]

标签:span   root   linux   运行程序   pre   amp   www   指定   lin   

可以参考文章: https://www.cnblogs.com/jmliao/p/11823209.html

 

具体事例:

#在root用户下,直接用以下命令来执行程序,程序执行后,程序隶属于用户git

su - git -c "nohup /home/git/gogs/gogs web >/dev/null 2>&1 &"

 

Linux指定用户运行程序

标签:span   root   linux   运行程序   pre   amp   www   指定   lin   

原文地址:https://www.cnblogs.com/faberbeta/p/linux-shell024.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!