doutangdan3588 2012-10-28 15:19
浏览 26

如何在MacOSX 10.7.4上以root身份运行PEAR?

PEAR has to be run via sudo on my system. This is annoying for two reasons. One, every time I want to use pear I have to do a sudo. Even if it's for something as simple as wanting to see how to use 'help'. The second reason is that it installs everything as root and I can't use simple programs installed via pear (like phpdoc) without having to sudo every time (which of course makes the generated documentation owned by root.

How do I configure PEAR so that it can be usable? I understand there might be security issues with not forcing PEAR to be run as root (i.e. I shouldn't be able to install to /usr/lib/php/pear without being root), but it's insane for me to have to use sudo to use the modules installed by PEAR.

  • 写回答

1条回答 默认 最新

  • drm30963 2012-10-30 09:03
    关注

    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.

    评论

报告相同问题?

悬赏问题

  • ¥20 数学建模,尽量用matlab回答,论文格式
  • ¥15 昨天挂载了一下u盘,然后拔了
  • ¥30 win from 窗口最大最小化,控件放大缩小,闪烁问题
  • ¥20 易康econgnition精度验证
  • ¥15 msix packaging tool打包问题
  • ¥28 微信小程序开发页面布局没问题,真机调试的时候页面布局就乱了
  • ¥15 python的qt5界面
  • ¥15 无线电能传输系统MATLAB仿真问题
  • ¥50 如何用脚本实现输入法的热键设置
  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能