【发布时间】: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