English 中文(简体)
将档案从根巴什包装中作为非专用文件存档
原标题:Running a file as nonroot from a root bash script

奥凯,我目前在我的服务器上使用一个鸡蛋。 我想用一个双面文字来开始,同时用几个其他文字。 所有这一切都是为了让它开始,但它赢得了作为根基的 t。

然而,我还需要在档案的目前目录中管理,或者显示错误。

For example: /home/eggdrop/eggdropbot/eggdrop will display an error, so to run it I need to cd /home/eggdrop/eggdropbot and then ./eggdrop

因此,我只能使用“sudo-u eggdrop /home/eggdrop/eggdropbot/eggdrop”,而且你可能知道,Dédo赢得了 t,这要么是毫无意义的。

任何建议?

最佳回答

为什么不光是cd 首先,然后,sudo -u /eggdrop .?

问题回答

<代码>cd,然后以<代码>sudo发布?

我这样说,就应该做到:

cd /home/eggdrop/eggdropbot && sudo -u eggdrop ./eggdrop

您可使用<代码>cd至名录,作为根本用户,然后使用sudo -u,从工作名录中援引该方案。





相关问题
Signed executables under Linux

For security reasons, it is desirable to check the integrity of code before execution, avoiding tampered software by an attacker. So, my question is How to sign executable code and run only trusted ...

encoding of file shell script

How can I check the file encoding in a shell script? I need to know if a file is encoded in utf-8 or iso-8859-1. Thanks

How to write a Remote DataModule to run on a linux server?

i would like to know if there are any solution to do this. Does anyone? The big picture: I want to access data over the web, using my delphi thin clients. But i´would like to keep my server/service ...

How can I use exit codes to run shell scripts sequentially?

Since cruise control is full of bugs that have wasted my entire week, I have decided the existing shell scripts I have are simpler and thus better. Here is what I have so far svn update /var/www/...

Good, free, easy-to-use C graphics libraries? [closed]

I was wondering if there were any good free graphics libraries for C that are easy to use? It s for plotting 2d and 3d graphs and then saving to a file. It s on a Linux system and there s no gnuplot ...

热门标签