我第一次尝试运行蛋糕控制台应用程序。从app
我正在运行的蛋糕文件夹中,Console/cake
我得到以下输出
PHP Warning: SplFileInfo::openFile(/var/www/virtual_host.com/public_html/app/tmp/cache/persistent/myapp_cake_core_file_map): failed to open stream: Permission denied in /var/www/virtual_host.com/public_html/lib/Cake/Cache/Engine/FileEngine.php on line 314
Warning: SplFileInfo::openFile(/var/www/virtual_host.com/public_html/app/tmp/cache/persistent/myapp_cake_core_file_map): failed to open stream: Permission denied in /var/www/virtual_host.com/public_html/lib/Cake/Cache/Engine/FileEngine.php on line 314
Welcome to CakePHP v2.3.7 Console
---------------------------------------------------------------
App : app
Path: /var/www/virtual_host.com/public_html/app/
---------------------------------------------------------------
Current Paths:
-app: app
-working: /var/www/virtual_host.com/public_html/app
-root: /var/www/virtual_host.com/public_html
-core: /var/www/virtual_host.com/public_html/lib
Changing Paths:
Your working path should be the same as your application path. To change your path use the '-app' param.
Example: -app relative/path/to/myapp or -app /absolute/path/to/myapp
Available Shells:
[CORE] acl, api, bake, command_list, console, i18n, schema, server, test, testsuite, upgrade
To run an app or core command, type cake shell_name [args]
To run a plugin command, type cake Plugin.shell_name [args]
To get help on a specific command, type cake shell_name --help
Warning Error: SplFileInfo::openFile(/var/www/virtual_host.com/public_html/app/tmp/cache/persistent/myapp_cake_core_file_map): failed to open stream: Permission denied in [/var/www/virtual_host.com/public_html/lib/Cake/Cache/Engine/FileEngine.php, line 314]
Warning Error: _cake_core_ cache was unable to write 'file_map' to File cache in [/var/www/virtual_host.com/public_html/lib/Cake/Cache/Cache.php, line 310]
这是 ls -l 的输出
drwxrwxr-x 3 DevinCrossman DevinCrossman 4096 Jul 16 14:17 Config
drwxrwxr-x 4 DevinCrossman DevinCrossman 4096 Jul 16 14:17 Console
drwxrwxr-x 3 DevinCrossman DevinCrossman 4096 Jul 16 14:17 Controller
-rw-rw-r-- 1 DevinCrossman DevinCrossman 701 Jul 16 14:17 index.php
drwxrwxr-x 2 DevinCrossman DevinCrossman 4096 Jul 16 14:17 Lib
drwxrwxr-x 3 DevinCrossman DevinCrossman 4096 Jul 16 14:17 Locale
drwxrwxr-x 4 DevinCrossman DevinCrossman 4096 Jul 16 14:17 Model
drwxrwxr-x 2 DevinCrossman DevinCrossman 4096 Jul 16 14:17 Plugin
drwxrwxr-x 4 DevinCrossman DevinCrossman 4096 Jul 16 14:17 Test
drwxrwxrwx 6 DevinCrossman DevinCrossman 4096 Jul 16 14:17 tmp
drwxrwxr-x 2 DevinCrossman DevinCrossman 4096 Jul 16 14:17 Vendor
drwxrwxr-x 9 DevinCrossman DevinCrossman 4096 Jul 16 14:17 View
drwxrwxr-x 6 DevinCrossman DevinCrossman 4096 Jul 16 14:17 webroot
我尝试根据this other SO question使用以下内容修改 Config/core.php
Cache::config('_cake_core_', array(
'engine' => $engine,
'prefix' => 'cake_core_',
'path' => CACHE . 'persistent' . DS,
'serialize' => ($engine === 'File'),
'duration' => $duration,
'mask' => 0666
));
Cache::config('_cake_model_', array(
'engine' => $engine,
'prefix' => 'cake_model_',
'path' => CACHE . 'models' . DS,
'serialize' => ($engine === 'File'),
'duration' => $duration,
'mask' => 0666
));
但它没有改变任何东西。
有人知道我需要更改哪些权限吗?需要更改全新安装的权限是否正常?(除了 app/tmp 我知道这很正常)