简体   繁体   English

Google Api客户端PHP-mkdir():权限被拒绝

[英]Google Api Client Php - mkdir():Permission denied

Using google api client for php to fetch some data, I have encountered the following error and I can't seem to find any working solution so far. 使用php的google api客户端获取某些数据,我遇到了以下错误,到目前为止,我似乎找不到任何有效的解决方案。

mkdir(): Permission denied
$storageDir = $this->path . '/' . substr(md5($file), 0, 2);
    if ($forWrite && ! is_dir($storageDir)) {
      if (! mkdir($storageDir, 0755, true)) {
        throw new Google_Cache_Exception("Could not create storage directory: $storageDir");
      }

I checked the permissions, users and groups. 我检查了权限,用户和组。 Everything is fine but I can't figure what's the problem. 一切都很好,但我不知道出了什么问题。 Any idea why this is happening? 知道为什么会这样吗?

通过将$this->path替换$this->path storage_path()解决了该问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM