I need to upload a file on the mediawiki installation on my server. When I try to upload a text file I see the following error:

Could not create directory "mwstore://local-backend/local-public/7/78"

The file uploaded is a plain text file encoded in ascii, however this happens with any kind of file like images and pdfs. Another curious thing is: there are attached files in other articles. I think this is caused by a bad configuration parameter or to some read-write access problem, but I couldn't find the exact cause.

  • I hope this is the right place to ask this question, however, if it isn't, notify me as soon as possible and I'll close this question and reopen it in the correct place. Thanks – Gabber Feb 5 '13 at 14:59
  • It sounds like a possible permissions issue or issue in your php.ini file. Have you gone through this? – nerdwaller Feb 5 '13 at 15:47

Uploads on Mediawiki require a specific setup to enable them.

  • First of all you should check if uploads are enabled on PHP. Check php.ini in your server for the following: file_uploads = On
  • Check the /images folder (or /upload folder) to have the correct permissions: 755 and make sure the directory is owned by the apache user (or the user running the apache server if different).
  • Check the LocalSettings.php file of Mediawiki to see if uploads are enabled or not. You should check for either $wgEnableUploads or $wgDisableUploads (depending on your version).

That should let you upload files without problem. If you want to fine tune the setup, you can take a look at Mediawiki's Manual.

| improve this answer | |

Try this:

sudo chmod -R 777 /var/www/youruploaddir
| improve this answer | |
  • 8
    Right, giving everyone full write and execute privileges inside your web folder. What could possibly go wrong? – Der Hochstapler Feb 5 '13 at 16:53
  • Sorry, but it helped me on my local server. =( – mmmh Feb 25 '13 at 12:14
  • I'm not doubting that it solved your problem. I'm proposing that using this approach will generate an even worse issue. – Der Hochstapler Feb 25 '13 at 12:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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