开发者

Error warning in mkdir function cakephp

Another day, another question...

I have trolled the "Intraweb" for the answers and I am well aware of the fact that it's a permissions issue, I am just struggling to work out what and where..

mkdir() [function.mkdir]: Permission denied [CORE/cake/libs/folder.php, line 498]

Any and all help is always appreciated.

Updated with additional info:

mkdir - [internal], line ??
Folder::create() - CORE/cake/libs/folder.php, line 498
Folder::create() - CORE/cake/libs/folder.php, line 495
Folder::create() - CORE/cake/libs/folder.php, line 495
Folder::create() - CORE/cake/libs/folder.php, line 495
Folder::create() - CORE/cake/libs/folder.php, line 495
MeioUploadBehavior::_createFolders() - APP/models/behaviors/meio_upload.php, line 1145
MeioUploadBehavior::setup() - APP/models/behaviors/meio_upload.php, line 28开发者_运维知识库4
BehaviorCollection::attach() - CORE/cake/libs/model/model_behavior.php, line 332
BehaviorCollection::init() - CORE/cake/libs/model/model_behavior.php, line 268
Model::__construct() - CORE/cake/libs/model/model.php, line 483
ClassRegistry::init() - CORE/cake/libs/class_registry.php, line 142
Controller::loadModel() - CORE/cake/libs/controller/controller.php, line 637
Controller::constructClasses() - CORE/cake/libs/controller/controller.php, line 493
Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 186
Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 171
require - APP/webroot/index.php, line 84
[main] - CORE/index.php, line 56

context:

$pathname = "/var/www/html/cakephp/app/webroot/app" $mode = 493 $nextPathname = "/var/www/html/cakephp/app/webroot" $old = 18

In $pathname, I am not sure where it's getting /app at the end..

The webroot permissions are as follows:

drwxr-xr-x 6 501 80 4096 Jul 13 17:53 webroot


Looking at the meio_upload.php behaviour, this what and where is the behaviour is trying to set up a thumbs directory, unless you've given the thumbnailDir a different value in the behaviour settings.

This thumbs directory will hang off the WWW_ROOT/uploads/<modelname>/<fieldname>, unless you've supplied an absolute directory for the dir option.

So I guess the bits you'll want to be looking at are the dir and thumbnailDir options in the settings for the behaviour. Chances are, your configured dir option starts with app.

And, back to the original problem of being unable to create the directory, you need to make sure that the user running the web server has permissions to write to the app/webroot directory.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜