【问题标题】:How can I give permissions to specific folders on heroku?如何授予heroku上特定文件夹的权限?
【发布时间】:2016-07-27 03:17:17
【问题描述】:

我正在尝试在 heroku 上安装 thelia,但我遇到了文件夹权限问题。如何以正确的方式制作 chmod?

这是我们的构建包:https://github.com/fzaffo/heroku-buildpack-php/blob/master/bin/compile

我们得到这个结果:chmod:

无法访问“/app/cache”:没有这样的文件或目录 (似乎在 /app 中找不到文件夹)

这是测试:http://eglaan.herokuapp.com

感谢支持。

【问题讨论】:

    标签: php heroku permissions chmod


    【解决方案1】:

    您需要包含composer.json 并从那里拍摄chmod 命令:

    {
      "scripts": {
        "compile": [
          "chmod -R 777 var/",
          "chmod 755 etc/",
          "chmod 644 etc/config.php"
        ]
      }
    }
    

    【讨论】:

    • 这对我不起作用。我设置了“chmod 600 文件夹/file.jpg”,但我仍然可以从公共 url 访问文件。有什么做错了吗?
    猜你喜欢
    • 2019-06-18
    • 1970-01-01
    • 2011-09-01
    • 1970-01-01
    • 1970-01-01
    • 2011-08-31
    • 2012-04-15
    • 1970-01-01
    • 2021-07-29
    相关资源
    最近更新 更多