【问题标题】:Apache permissions, PHP file create on Arch Lamp SetupApache 权限,在 Arch Lamp Setup 上创建 PHP 文件
【发布时间】:2013-06-09 16:18:45
【问题描述】:

我似乎无法在 Arch Linux Lamp Setup 中上传和创建文件。当我检查我想要的文件夹权限时,我得到:

ls -ldh thumbnails/
drwxrwxrwx 5 ytsejam http 4.0K Jun 13 12:33 thumbnails/

我通过 php whoami() 检查我的 apache 用户,结果是“http” 和 /etc/group 有这些条目

http:x:33:ytsejam
users:x:100:http
wheel:x:10:root,ytsejam.

我在 /var/log/httpd/error_log 或 access_log 上看不到任何错误。 上传文件时出现错误

ErrorException

file_put_contents(/home/ytsejam/public_html/projemiz/public/uploads/img/posts/thumbnails/213/thumb-flam1.jpg): failed to open stream: No such file or directory

当我手动创建文件夹时,我可以成功上传。这是一个权限错误,但我不知道如何修复它。有什么帮助吗?

【问题讨论】:

    标签: php apache file-permissions archlinux


    【解决方案1】:

    无法使用file_put_contents 创建目录(文件夹)。

    PHP, Creating a folder when I run file_put_contents()

    【讨论】:

      猜你喜欢
      • 2011-07-07
      • 1970-01-01
      • 2016-08-14
      • 2020-09-16
      • 2015-10-15
      • 2015-04-03
      • 2010-11-28
      • 2016-11-20
      • 2015-12-31
      相关资源
      最近更新 更多