mkdir(): Permission denied 错误 runtime已经777了

浏览:1072 发布日期:2021/01/10 分类:求助交流
用RHEL.8 一直提示 mkdir(): Permission denied 错误,runtime 也 -R 777 了,文件夹也改成Apache 名下了,还是不行,哪位大神给说说咋弄?

《《错误提示》》

#0 [2]ErrorException in File.php line 33
mkdir(): Permission denied
* @param string $content 缓存的内容
* @return void
*/
public function write(string $cacheFile, string $content): void
{
// 检测模板目录
$dir = dirname($cacheFile);

if (!is_dir($dir)) {
mkdir($dir, 0755, true);
}

// 生成模板缓存文件
if (false === file_put_contents($cacheFile, $content)) {
throw new Exception('cache write error:' . $cacheFile, 11602);
}
}

/**

《《文件权限》》
drwxr-xr-x. 9 apache apache 243 Jan 10 04:36 .
drwxr-xr-x. 3 apache apache 60 Jan 9 14:23 ..
drwxr-xr-x. 5 apache apache 253 Jan 9 15:15 app
-rwxr-xr-x. 1 apache apache 1222 Oct 7 04:22 composer.json
-rwxr-xr-x. 1 apache apache 39575 Dec 7 09:51 composer.lock
drwxr-xr-x. 2 apache apache 258 Jan 9 15:16 config
-rwxr-xr-x. 1 apache apache 388331 Jan 4 06:07 database.sql
-rwxr-xr-x. 1 apache apache 268 Jan 10 04:26 .env
drwxr-xr-x. 2 apache apache 24 Jan 9 15:16 extend
-rwxr-xr-x. 1 apache apache 34 Oct 7 02:39 .gitignore
-rwxr-xr-x. 1 apache apache 1822 Oct 7 02:39 LICENSE.txt
drwxr-xr-x. 5 apache apache 172 Jan 9 15:29 public
drwxrwxrwx. 2 apache apache 6 Jan 10 04:36 runtime
-rwxr-xr-x. 1 apache apache 180 Oct 7 02:39 think
-rwxr-xr-x. 1 apache apache 2038 Oct 7 02:39 .travis.yml
drwxr-xr-x. 8 apache apache 147 Jan 9 15:37 vendor
drwxr-xr-x. 3 apache apache 36 Jan 9 15:47 view

《《Apache》》
apache 1425 1413 0 04:30 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 1426 1413 0 04:30 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 1427 1413 0 04:30 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 1428 1413 0 04:30 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 1641 1413 0 04:30 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
最佳答案
评论( 相关
后面还有条评论,点击查看>>