dongman5539
2016-03-17 05:03
浏览 45
已采纳

Laravel 5.0对ubuntu的许可

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.

图片转代码服务由CSDN问答提供 功能建议

每当我从我的生产服务器(即azure vps)上的git中提取时,我必须授予我的proejct目录 ,以便apache用户可以访问它。 否则它说,权限被拒绝异常。 每当我拉新代码时,我必须在终端中运行以下行,

  sudo chown -R www-data:www- 数据projectDirectory 
   
 
 

最糟糕的是Laravel为日志创建新文件时,会出现同样的问题,这给我以下异常:

Symfony \ Component \ Debug \ Exception \ FatalErrorException:Exception 'symfony \ Component \ Debug \ Exception \ FatalErrorException',带消息 '未捕获异常'UnexpectedValueException',消息'The stream或 文件“/storage/logs/laravel-2016-03-17.log

nn

任何人都可以告诉我如何摆脱这个关键问题。谢谢

PS我知道这与laravel无关。

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

2条回答 默认 最新

  • duangang2825 2016-03-20 05:36
    最佳回答

    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

    评论
    解决 无用
    打赏 举报
查看更多回答(1条)

相关推荐 更多相似问题