Laravel 5.0许可在Ubuntu [英] Laravel 5.0 Permission on ubuntu
问题描述
每当我从混帐拉我的生产服务器,这是蔚蓝的VPS上,我不得不放弃允许我proejct目录,这样apache用户可以访问它。否则,它说,权限被拒绝例外。
所以我必须在每一个终端每当我拉新的code时运行以下行,
须藤CHOWN -R WWW的数据:WWW的数据projectDirectory
和最糟糕的是,每当Laravel创建日志的新文件,同样的问题发生了,这给了我以下异常:
的Symfony \\分量\\调试\\异常\\ FatalErrorException:异常
'的Symfony \\分量\\调试\\异常\\ FatalErrorException'与消息
未捕获的异常'UnexpectedValueException有消息的
流或文件/storage/logs/laravel-2016-03-17.log
块引用>谁能告诉我,我怎么能摆脱这一关键问题。谢谢
P.S。我知道这是无关与laravel。
块引用>解决方案所以,我atlast找到一个解决方案。我真正想要的是,每当创建新的文件应该从父目录继承所有权限。
须藤搭配chmod G + S / projectDirectory
Whenever i pull from git on my production server, which is azure vps, i have to give permission to my proejct directory, so that apache user can access it. Otherwise it says, permission denied exception. so i have to run following line in terminal every time whenever i pull new code,
sudo chown -R www-data:www-data projectDirectory
And the worst thing is whenever Laravel creates new files for log, same issue happens, which gives me following exception:
Symfony\Component\Debug\Exception\FatalErrorException: Exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Uncaught exception 'UnexpectedValueException' with message 'The stream or file " /storage/logs/laravel-2016-03-17.log
Can anyone tell me how i can get rid of this critical issue. Thanks
P.S. I know this is has nothing to do with laravel.
解决方案So, atlast i found a solution. What i really wanted was, whenever new file is created it should inherit all permissions from parent directory.
sudo chmod g+s /projectDirectory
这篇关于Laravel 5.0许可在Ubuntu的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!