GoDaddy Upload Media Error
-
I recently ran into a problem between GoDaddy and WordPress that I have a workaround for, but could use a little help to find a proper solution.
The Problem:
My client doesn’t want to switch to Linux and pay an extra $6/mo (Don’t ask…). Apparently this would fix the problem I’m running into, but I can’t just do that in this case. The problem is with the free hosting, you’re stuck on a Windows server, which is not as easy to work with as far as changing permissions on directories.Anyway, when I try to upload a new photo to my Media Library while writing a post, I kept getting an error that looked like this:
Warning: touch() [function.touch]: Unable to create file D:\Hosting\XXXXXXX\html/wp-content/img.tmp because Permission denied in D:\Hosting\XXXXXXX\html\wp-admin\includes\file.php on line 177
(The X’s are actually numbers that ID the site on GoDaddy, but that’s not important here)
I’ve highlighted a few key parts of the error that I’ll refer to later.
The Workaround:
To correct this problem, I had to make wp-content Read/Write through GoDaddy’s online FTP File Manager, which is definitely not how I want to leave it. I also created a new directory in my root called “media” that I set to Read/Write, and changed by WP Media Settings to save any photos to that directory instead of wp-content/uploads…Photos are properly being placed in /media, but the problem is that WP wants to store a .tmp file in wp-content. It doesn’t stay there, but it wants to put it there until the upload to /media has been completed. If I change the settings on wp-content back to “Inherit from Parent” (I assume that’s Read-Only), I get the error again. So it has to remain Read/Write in order to work as-is.
The Solution?:
I don’t know enough about programming to be able to properly edit the file.php that is referenced in the error to tell it to put the .tmp file in /media, too. This would let me turn the permissions back to “Inherit from Parent” on wp-content and just leave the isolated /media director as Read/Write.Can any programmers take a look at file.php and offer a solution?
The topic ‘GoDaddy Upload Media Error’ is closed to new replies.