Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
    
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
add comment

2 Answers 2

up vote 3 down vote accepted

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.

share|improve this answer
add comment

Try this:

sudo chmod -R 777 /var/www/youruploaddir
share|improve this answer
6  
Right, giving everyone full write and execute privileges inside your web folder. What could possibly go wrong? –  Oliver Salzburg Feb 5 '13 at 16:53
    
Sorry, but it helped me on my local server. =( –  Michael 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. –  Oliver Salzburg Feb 25 '13 at 12:36
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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