你的問題有幾個可能… 一:如之前Jacky所說,是SELINUX 的問題 有關關閉SELINUX的方法請 參考http: //wiki.debian.org.hk/w/Enable_or_Disable_SELinux
二:PHP開啟了 SAFE MODE 有關檢查PHP有否開啟SAFE MODE,請使用 phpinfo(); 判測 有關PHP的SAFE MODE設置方法,請到php.net中搜尋 三:系統權限問題 請使用chmod/chown檢查有關目錄的權限與屬性 或修改 httpd.conf / php.ini 中的運行者 uid -------- Original Message -------- Subject: [PerlChina] Re: 求教虚拟主机配置 From: 钟声 <[email protected]> To: [email protected] Date: 14/7/2009 17:59 > 我用的ubuntu那些命令不能用。 > 在官网上找到这么几句 > > > Uncomplicated Firewall > > Starting with version 8.04, Ubuntu provides ufw (Uncomplicated > Firewall), a command line utility whose name tells most of what it > aims to be. If iptables configuration is too complicated for your > needs, ufw does make it very simple to add host based rules protection > for your server (or desktop). In order to maintain backward > compatibility, ufw is disabled but installed by default, and enabling > it is just a command away. Because ufw uses the service list, you do > not need to know the port numbers you want to open, you just need to > specify the protocol name you want to enable, for example: > > sudo ufw enable > sudo ufw allow smtp > sudo ufw allow http > > 命令文档一大堆,英文不好,具体也没看懂。 > > 我不明白虚拟主机的权限问题和Filewall什么关系,因为虚拟主机是可以访问 > 的。只是虚拟主机中的PHP没权限创建文件。。。 > 能帮忙解释下吗 > > > > 2009/7/14 smallfish.xy <[email protected] > <mailto:[email protected]>> > > shell> setup > 防火墙配置 > -- > http://hi.baidu.com/smallfish_xy > http://code.google.com/p/smallfish/ > > > 2009/7/14 钟声 <[email protected] <mailto:[email protected]>> > > 好像没装这个。。。 > > 2009/7/14 Jacky Xu <[email protected] <mailto:[email protected]>> > > 关闭 selinux再测试 > > 在 2009-07-14二的 16:15 +0800,钟声写道: > > 问下大家 > > 我用apache配置了两个虚拟主机 > > 但是我用PHP测试的时候发现不能创建文件,提示没有权限 > > > > 后来发现却是用户权限的问题,我添加了俩个用户 > > > > 但还是不行。。用系统默认的www-data就没问题 > > > > 是不是虚拟主机目录不能给本地用户做家目录?? > > > > > > > > > > > > > > > > > > -- Best Regards, Anthony WU --~--~---------~--~----~------------~-------~--~----~ 您收到此信息是由于您订阅了 Google 论坛“PerlChina Mongers 讨论组”论坛。 要在此论坛发帖,请发电子邮件到 [email protected] 要退订此论坛,请发邮件至 [email protected] 更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛 -~----------~----~----~----~------~----~------~--~---
