你的php要是有root用户的权限就可以.
解决方案 »
- 插入不重复记录~~~求一mysql语句~~~
- php中怎样将1变成一个字节的Integer类型啊?
- PHP兼职要不
- 关于表单的一个小问题
- ____________php函数问题______________strpos问题_____________再次救命______________
- 怎样用代码设定ie11强制性打开兼容视图或使用ie8内核?
- 如何在子类中调用父类变量??
- 请问,哪里有在线显示天气预报的代码或网站啊,主要是显示四川省各大城市的天气情况
- php的MIME怎么发送html格式的邮件?
- 有关页面重定向(header)的问题
- 在LINUX下,为PHP增加GD,重新编译时出现的问题。
- 请问那里可以下载到4Images的源代码呢?急~~~~
不过 我怎么知道我的PHP是root用户权限呢?PS: 你指是会不会是apache执行的身份呢?愿闻其详
----------------------------------------------
User apache
Group apache
----------------------------------------------
改为root是可以的,不过不安全.另一种方法是直接修改/etc/passwd文件(取消shadow套再修改).无论怎样,以root身份运行apache服务都是不安全的.如果对实时性要求不高的话,
可以用apache将要添加的用户信息写入数据库, 编写一后台程序(shell脚本也可)定时扫描该数据库,并添加相应用户.
User apache
Group apache
都改为root之后 重启apache 出现提示Error: Apache has not been designed to serve pages while
running as root. There are known race conditions that
will allow any local user to read any file on the system.
If you still desire to serve pages as root then
add -DBIG_SECURITY_HOLE to the EXTRA_CFLAGS line in your
src/Configuration file and rebuild the server. It is
strongly suggested that you instead modify the User
directive in your httpd.conf file to list a non-root
user.---------
to netvt
你说提到的"另一种方法是直接修改/etc/passwd文件(取消shadow套再修改)."
~~~~~~~~~~~~~~~~~~~请问这什么意思?
如果去实现?
谢谢
add -DBIG_SECURITY_HOLE to the EXTRA_CFLAGS line in your
src/Configuration file and rebuild the server.
-----------------
passwd是帐户及密码记录文件.一般情况下/etc/passwd是shadow过的,也就是平时看到的passwd并不是真正的passwd文件.
即一般情况下看到的passwd文件是不显示密码的.(以x 代替),
取消shadow用 pwunconv (激活用pwconv)
===passwd文件格式如下:
帐户名:密码:UID:GID:用户全称:主目录:shell
======
passwd的默认权限为 只有root有权修改,
-rw-r--r-- 1 root root 1631 10月 7 14:40 /etc/passwd
--
#chmod 666 /etc/passwd (设定为其他人可写,存在安全隐患)
没有你所说的
pwunconv 命令
....
如果没有shadow过,不必pwunconv