bash 蛋糕PHP。应用程序/控制台/蛋糕:root 用户的权限被拒绝
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/25739370/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
CakePHP. app/Console/cake: Permission denied for root user
提问by Alexandr
I am using CakePHP 2.4.7 and I'm trying to execute CakePHP shell on remote host.
我正在使用 CakePHP 2.4.7 并且我正在尝试在远程主机上执行 CakePHP shell。
I'm connecting to server as root and then executing $ [path_to_my_foler]/app/Console/cake
我以 root 身份连接到服务器然后执行 $ [path_to_my_foler]/app/Console/cake
The output is: -bash: [path_to_my_foler]/app/Console/cake: Permission denied
输出是: -bash: [path_to_my_foler]/app/Console/cake: Permission denied
How could it be? How to fix it?
怎么会这样?如何解决?
回答by antoniovassell
Did you get this solve? I think this could do the trick. (Running the command from your app
directory
你得到这个解决了吗?我认为这可以解决问题。(从您的app
目录运行命令
chmod +x Console/cake
回答by Ariful Haque
In CakePHP Version 3 and above this is the right command.
在 CakePHP 版本 3 及更高版本中,这是正确的命令。
chmod +x bin/cake
This is CakePHP documentation for reference.
这是可供参考的 CakePHP 文档。
Console
The cake executable has been moved from the app/Console directory to the bin directory within the application skeleton. You can now invoke CakePHP's console with bin/cake.
安慰
cake 可执行文件已从 app/Console 目录移动到应用程序框架内的 bin 目录。您现在可以使用 bin/cake 调用 CakePHP 的控制台。