问题描述
我现在的处境非常有趣.
I am in a really interesting situation right now.
使用 WP Academy 的 WP Clone 从开发环境迁移客户端网站后,我在尝试通过 Worpress 媒体上传器上传图像时收到此错误.
After migrating a client website from a development environment using, WP Clone by WP Academy, I get this error when trying to upload images via the Worpress media uploader.
image.png"由于错误无法上传无法创建目录 uploads/2015/07.服务器是否可以写入其父目录?
我登录到 Godaddy 并通过 ssh 将整个上传/文件夹权限更改为 777(够疯狂).以及它的所有内容.
I logged into Godaddy and change the entire uploads/ folder permission via ssh to 777 (crazy enough). And all its contents.
我仍然遇到同样的错误.
I still got the same error.
更深入地探索之后,我发现该网站的运行位置与我进入的机器不同.什么意思?
After probing a little deeper, I found out the website is running from a different location than the machine i am sshed into.What do I mean?
当我通过 ssh 运行 pwd 时,可以看到我得到的当前工作目录.
When I run pwd via ssh, to see my current working directory I get.
-bash-4.2$ pwd
/home/clientname/html/wp-content/uploads
但在 Wordpress 设置中,设置 -> 媒体选项在此文件夹中存储上传"的值为
But In the Wordpress setting at, Settings -> MediaThe option "store uploads in this folder" has a value of
/home4/d***71/public_html/website.url/wp-content/uploads
含义站点文件被复制并托管在与通过 SSH 提供的位置不同的位置,这可能是因为 Godaddy 的托管 wordpress 托管配置了一些用户无法控制的特殊缓存设置.
Meaning The site files are copied and hosted in a different location than that given via the SSH, This is probably due to the fact that Godaddy's managed wordpress hosting has some special cache setting configured beyond the control of the user.
现在的问题是如何更正文件权限问题并使我的上传正常工作.
The problem now is how do I correct the File Permission issue and have my uploads working properly.
:)
推荐答案
- 登录到你的godaddy面板并点击文件管理器
- 点击或打开您的项目文件夹
- 找到上传文件夹并点击复选框
- 点击隐私图标并选中继承设置所有子文件夹以继承权限两个复选框
这篇关于Godaddy 托管 WP 托管中的 Wordpress 文件上传器错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!