0

PEAR 必须sudo在我的系统上运行。这很烦人,原因有两个。一,每次我想使用pear我都必须做一个sudo. 即使只是想看看如何使用“帮助”这样简单的事情。第二个原因是它安装了所有东西,root而且我不能使用通过pear(like phpdoc) 安装的简单程序,而不必每次都使用 sudo (这当然使生成的文档归 root 用户所有。

如何配置 PEAR 以使其可用?我知道不强制 PEAR 以 root 身份运行可能存在安全问题(即,如果不是 root,我不应该能够安装到/usr/lib/php/pear),但是我不得不使用sudoPEAR 安装的模块来使用它是疯狂的。

4

1 回答 1

0

The problem was that my umask was set incorrectly to 007. This means that whenever I tried to use a package that pear had installed, I couldn't unless I was root. A better umask would be 006. This would allow everything installed to by root to be readable or executable (depending on the context).

You can set your umask in your .bashrc file in your home directory. Just add this line (or change the line that is incorrect):

umask 006

Hope this helps someone searching for an answer to this.

于 2012-10-30T09:03:35.573 回答