-1
The uploaded file could not be moved to /var/www/wp-uploads/localhost/2011/10.

That's the error message I get when I try to upload a wordpress theme. This is my current permission status of my folder.

$ sudo ls -la /var/www/wp-uploads/localhost
total 12
drwxrwxr-- 3 root     www-data 4096 2011-10-27 16:44 .
drwxr-x--- 3 root     www-data 4096 2011-10-27 15:45 ..
drwxrwxr-- 3 www-data www-data 4096 2011-10-27 16:44 2011

Is there a terminal command I can use to allow wordpress to have permission to write things in this folder?

I use LAMP and Ubuntu 11.04.

Thank you.

4
  • 1
    This is a user question, and would be better-asked in the WPORG How-To and Troubleshooting Forum. Oct 27, 2011 at 22:19
  • @Chip Bennett I disagree, this seems perfectly appropriate.
    – Rarst
    Oct 30, 2011 at 20:21
  • @Rarst really? A file-permissions question? Oct 30, 2011 at 20:24
  • @Chip Bennett how do you know it's permissions before question is resolved? WP outputs this error of its own and suppresses possible underlying PHP errors, this very well qualifies as issue that at least starts in WordPress and is specific as such.
    – Rarst
    Oct 30, 2011 at 20:36

1 Answer 1

0

From quick search of source for this error message, it is likely to be triggered by failed move_uploaded_file() function call, which is native PHP and not WordPress.

Documentation says that it has some restrictions, related to safe_mode and open_basedir so that might be your issue.

Since WP suppresses error output from this function with @ directive I'd try to emulate such file move or un-suppress error (as far as I know this is not possible natively, but possible with xdebug and possibly other debuggers).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.