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"
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).
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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With