【发布时间】:2013-05-10 14:42:55
【问题描述】:
我正在尝试从我们的网络发布例程中删除 FTP,并在我们的服务器上安装了 Mercurial。一段时间以来,我一直在向服务器上的各种用户帐户推送实时存储库,但我还想将各个服务器用户帐户锁定到 chroot 环境。
问题是,当我使用 chroot 锁定帐户时,该帐户不再有权访问 hg 二进制文件并且无法执行更新。
我已经通过参考这篇文章将 hg 二进制文件和各种 python 文件复制到 chroot 内的目录中:https://www.mercurial-scm.org/wiki/OpenBsdWebDirSetup
但这不是特定于 CentOS 的,而且有些布局有些不同。我可以通过在用户的 .profile 中添加一行来修复 python 错误,如以下答案所示:Python executable not finding libpython shared library
现在至少我收到了 hg 的回复,但回复是这样的:
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
'import site' failed; use -v for traceback
Traceback (most recent call last):
File "/bin/hg", line 10, in <module>
import os
ImportError: No module named os
如果库位于错误的位置,我可以在 .profile 中放入任何内容来更正它还是必须移动文件?
当我将帐户切换为 chrooted 状态时,我在 /lib 和 /lib64 中获得的所有文件都是由 Plesk 创建的,但我检查了上述教程中的所有文件都存在并且与我从 ldd 的输出相匹配。
【问题讨论】:
标签: python mercurial centos chroot