芹菜:运行具有超级用户权限的工作程序

2024-04-19 03:21:08 发布

您现在位置:Python中文网/ 问答频道 /正文

我用runit作为用户而不是根用户启动了一个celery进程。当我查看svlogd日志时,我看到:

2014-07-05_10:07:44.10586 Running a worker with superuser privileges when the
2014-07-05_10:07:44.10589 worker accepts messages serialized with pickle is a very bad idea!
2014-07-05_10:07:44.10589 
2014-07-05_10:07:44.10589 If you really want to continue then you have to set the C_FORCE_ROOT
2014-07-05_10:07:44.10589 environment variable (but please think about this before you do).
2014-07-05_10:07:44.10589 
2014-07-05_10:07:44.10590 User information: uid=0 euid=0 gid=0 egid=0

看起来celery是以root用户身份运行的,但当我运行ps aux时,它实际上是以预期用户的身份运行的:

^{pr2}$

有人知道怎么解决这个问题吗


Tags: theto用户you进程with身份running