我能找到的Web服务器正在运行在PHP中哪些用户? [英] Can I find which user the web server is being run as in PHP?

查看:126
本文介绍了我能找到的Web服务器正在运行在PHP中哪些用户?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在写在PHP一个简单的Web应用程序,需要具有对服务器上的目录的写入权限,如果该目录不可写我想显示一条错误消息,说明设置目录的所有者谁Web服务器正在运行的(如www数据,没有人),但由于大多数人不知道这一点,将是很好能够告诉他们是谁chown将此目录。是否有可能从PHP发现这个?

I'm writing a simple web app in PHP that needs to have write access to a directory on the server, if the directory isn't writable I want to display an error message explaining to set the owner of the directory to whoever the webserver is being run as (eg. www-data, nobody) but as most people don't know this it would be nice to be able to tell them who to chown the directory to. Is it possible to find this from PHP?

推荐答案

查看了shell_exec()

这篇关于我能找到的Web服务器正在运行在PHP中哪些用户?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆