【发布时间】:2020-04-24 20:55:51
【问题描述】:
例外:不允许写入 /home/vishu/.config/psysh。
在/usr/share/nginx/html/example/vendor/psy/psysh/src/ConfigPaths.php:228
@\mkdir($dir, 0700, true);
}
if (!\is_dir($dir) || !\is_writable($dir)) {
\trigger_error(\sprintf('Writing to %s is not allowed.', $dir), E_USER_NOTICE);
return false;
}
【问题讨论】:
-
你检查文件权限了吗?您应该尝试提供有关问题的更多详细信息,而不仅仅是粘贴代码/日志/图像,请参阅Help Center > Asking。
-
sudo chmod -R 777 存储
-
bernhardh 在 github 上建议的解决方案是通过将以下内容设置为 .env XDG_CONFIG_HOME=/path/to/new/location 来修改位置,但我没有在 Vendor/ 中设置路径。 ./Xdg.php
-
你只检查 dir 是否可写以及它是否是一个 dir,而不是你是否有权修改它。
-
我有权限写。 -rw-rw-r-- 1 vishu www-data /usr/share/nginx/html/example/vendor/psy/psysh/src/ConfigPaths.php
标签: php laravel error-handling tinker