2016-11-04 22 views
1

我目前正在尝试在Raspberry Pi上安装并运行Phabricator以供个人使用(即使它并非由Phacility推荐,我还是认为我仍然试一试)。到目前为止,我能够设置除phd用户之外的所有内容作为守护进程。Phabricator Daemon:`phd`无法使用`sudo`切换到正确的用户

/etc/passwd文件

phd:x:1001:1001:,,,:/home/phd:/bin/bash 

/etc/shadow中

phd:NP:17107:0:99999:7::: 

我创建的用户博士学位,并在阴影给IM NP,但开始时还是让Phabricator无法切换到博士守护进程。

sudo ./bin/phd restart 
Interrupting process 19517... 
Process 19517 exited. 
Freeing active task leases... 
Freed 0 task lease(s). 
Starting daemons as phd 
Launching daemons: 
(Logs will appear in "/var/tmp/phd/log/daemons.log".) 

PhabricatorRepositoryPullLocalDaemon (Static) 
PhabricatorTriggerDaemon (Static) 
PhabricatorTaskmasterDaemon (Autoscaling: group=task, pool=4, reserve=0) 

Usage Exception: Daemons are configured to run as user "phd" in 
configuration option `phd.user`, but the current user is "root" and 
`phd` was unable to switch to the correct user with `sudo`. Command output: 

Command failed with error #255! 
COMMAND 
exec sudo -En -u 'phd' -- ./phd-daemon '--verbose' 

STDOUT 
(empty) 

STDERR 
[2016-11-04 08:54:54] EXCEPTION: (Exception) Specified daemon PID directory 
('/var/tmp/phd/pid') does not exist or is not writable by the daemon user! 
at [<phutil>/src/daemon/PhutilDaemonOverseer.php:115] 
arcanist(head=master, ref.master=fad85844314b), phabricator(head=master, 
ref.master=6982bded7124), phutil(head=master, ref.master=2b7b1007bf87) 
#0 PhutilDaemonOverseer::__construct(array) called at 
[<phabricator>/scripts/daemon/launch_daemon.php:13] 

我试过的是通过su phd -c "/home/phd/phabricator/bin/phd restart"启动phd用户,但是从我那里查询密码。

我挨得很近,本指南https://secure.phabricator.com/book/phabricator/article/diffusion_hosting/以及本https://gist.github.com/sparrc/b4eff48a3e7af8411fc1

任何帮助,真的,真的很感谢!

+0

也许仔细看一下STDERR抱怨的PID目录的权限。 – JSON

+0

男人,非常感谢你......你不能相信它是多么的非常活跃。 如果任何人会绊倒accros这一点,解决办法是: 须藤搭配chmod 775/var/tmp中/博士/ PID sudo的文件模式去+ W/var/tmp中/博士/ PID – SSND

回答

1

感谢@JSON谁只是让我知道一条线,我似乎总是错过,该解决方案是:

sudo chmod go+w /var/tmp/phd/pid 

这将使directoy可写和免费为所有,让我开始错误

+0

phabricator安装文件对于遗漏大量信息是非常可怕的!这是一个耻辱,因为制造商是如此惊人!交互式安装脚本可以缓解复杂性。 – user3791372

0

我们通常运行

sudo -u phd ./bin/phd restart 
+0

这并没有工作,我想。运行你给我的命令导致: http://pastebin.com/qH8vByi4 当通过'sudo -u phd ./bin/phd status'询问时,它告诉我没有守护进程在运行。 – SSND