真是没有写权限吗)gii 工具在unbuntu上使用求助

Yii配制文件如下config/main.php

// use gii begin

'modules'=>array(


	'gii'=>array(


		'class'=>'system.gii.GiiModule',


		'password'=>'aspphp',


		'ipFilters'=>array('192.168.1.100'),


		'newFileMode'=>0777,


		'newDirMode'=>0777,


		),


	),

二:gii操作页面

http://192.168.1.100:8181/index.php?r=gii/model

Model Generator

This generator generates a model class for the specified database table.

Model Path *

application.models

This refers to the directory that the new model class file should be generated under. It should be specified in the form of a path alias, for example, application.models.

Code Template *

default (/home/zhangxu/web/yii/framework/gii/generators/model/templates/default)

我的“错误提示“如下:

---------------------------

There was some error when generating the code. Please check the following messages.

Generating code using template "/home/zhangxu/web/yii/framework/gii/generators/model/templates/default"…

generating models/Test.php

       Unable to write the file '/home/zhangxu/web/yiiBlog/protected/models/Test.php'.

done!

--------------------------

第一次使用GII工具,英语功底差,不能正确翻译,理解不够

只是试着做,出了问题,搜索半天中文,没有解决,

看上边代码,“错误提示“,冒似我没有写的权限

造成这种结果有哪些原因,请指教

Unable to write the file

權限問題.chmod 777 /home/zhangxu/web/yiiBlog/protected/models/

再試一次

drwxrwxrwx 2 zhangxu zhangxu 4096 2010-09-23 11:31 models

如上,models文件已经拥有写的权限了

可是还没有解决,有点乱

今天到单位,用同样方法,winxp上可以

请坛友推测下其它原因

这样一比较,更估计可能出是权限问题;


Unable to write the file '/home/zhangxu/web/yiiBlog/protected/models/Test.php'.

是Test.php的文件已经建立起来了嘛?就是说,仅是不能write,这样看一下,Test.php的权限。

相当然的认为Test.php权限因该是:php-cgi进程用户(或者是apache进程用户)rwx, 其它用户进程组用户r;(如果是这样,暂且想不出其他的原因)

如果没有建立:便是不能create Test.php(貌似已经777 model了,应该不会)。

我在mac下遇到一次 gii写入权限的问题,后来解决办法是对所有protected目录下的Model, Control Views上了anyone的读写权限,因为不是发布环境问题不大,到了发布环境只要修改一下main.php里面的环境变量或者linux下面的777, 5楼应该是正解