Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

File Upload Error in MediaWiki 1.22.3 - Could not create directory "mwstore://local-backend/local-public/7/70"

We recently upgraded our MediaWiki installation to 1.22.3 running on Ubuntu 12.04.2 LTS. Now when we try to upload files, we get the following error:

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

like image 478
Jeff T Avatar asked Mar 10 '14 14:03

Jeff T


People also ask

Why are my MediaWiki uploads not working in PHP?

If this is not set, PHP scripts cannot use the upload functions, and MediaWiki's uploads will not be enabled. If the open_basedir directive is set, it must include both the destination upload folder in your MediaWiki installation (" {$IP}/images") and the 'upload_tmp_dir' folder (default system folder if not set).

Why can't I upload images to my wiki or website?

The upload directory needs to be configured so that it is not possible for an end user to upload and execute other scripts, which could then exploit access to your web directory and damage your wiki or web site. Set the /images folder (or the /uploads folder in previous versions) to have permission "755": World can read and execute.

What types of files does MediaWiki reject for uploading?

By default, MediaWiki will scan all uploads that appear to be ZIP archives and reject any that contain Java .class files. This is a security measure to prevent users uploading a malicious Java applet.

How to enable zip extension in MediaWiki?

To enable zip extension (tested in MediaWiki v1.19.23) the following will be necessary in the LocalSettings.php file: By default anonymous uploads are not allowed. You must register and log in before the upload file link appears in the toolbox.


1 Answers

Finally found the solution in the MediaWiki documentation. The problem was the ownership of the images directory. Making the adjustments suggested in the documentation eliminated the problem. See the following for details: http://www.mediawiki.org/wiki/Manual:Configuring_file_uploads

Specifically, do this:

sudo chown -R www-data:www-data images/ sudo chmod -R 755 images/

Your installation MIGHT use the uploads/ directory instead. If so, do the same to it.

like image 87
Jeff T Avatar answered Oct 19 '22 20:10

Jeff T