简体   繁体   中英

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.

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()解决了该问题

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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