V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
proxytoworld
V2EX  ›  PHP

u 安装完 laravel7 后,访问网站出现权限错误

  •  
  •   proxytoworld · 2020-05-14 23:31:33 +08:00 · 1917 次点击
    这是一个创建于 1440 天前的主题,其中的信息可能已经有所发展或是发生改变。

    第一次访问出现这个错误:The stream or file "/var/www/laravel/storage/logs/laravel.log" could not be opened: failed 有 v 友知道为什么吗,还没有进行编程 环境:ubuntu1804 + PHP7.2.24 + apache2.4.29 已进行 chmod -R 755 storage/

    2 条回复    2020-05-15 05:44:16 +08:00
    agdhole
        1
    agdhole  
       2020-05-15 00:07:01 +08:00
    sudo chmod -R 755 laravel
    chmod -R o+w laravel/storage
    shellic
        2
    shellic  
       2020-05-15 05:44:16 +08:00 via Android
    chown 把文件所有者设置为 apache 的运行用户
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1124 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 22:41 · PVG 06:41 · LAX 15:41 · JFK 18:41
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.