Home > Backend Development > PHP Tutorial > Centos与Debian PHP环境变量有关问题

Centos与Debian PHP环境变量有关问题

WBOY
Release: 2016-06-13 11:30:39
Original
861 people have browsed it

Centos与Debian PHP环境变量问题。
通过PHP shell_exec来执行 shell脚本。
shell脚本中有执行到python,

python脚本,os.path.expanduser('~')
在Centos系统是取到 /root/
而Debian系统是取到 /home/www

PHP的真实用户是www的,但上面shell脚本是以root权限运行的。


Centos下是取到root用户主目录
/root/

而Debian是取到www用户主目录
/home/www

现在怎么保持一致,有些晕了。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template