After installing to the latest version of mediawiki, I am unable to upload text files, and get the following messege: Could not open lock file for "mwstore://local-backend/local-public/d/dc"
How can I fix this?
After installing to the latest version of mediawiki, I am unable to upload text files, and get the following messege: Could not open lock file for "mwstore://local-backend/local-public/d/dc"
How can I fix this?
Hi,
I've got the same problem but it is not fixed by chmod 777 images.
Ive just upgraded to 1.19 and
[[Image:pic.gif]]
, [[Image:pic.gif|640px]]
Amy suggestions appreciated
Kirby
le dossier mediawiki et tout son contenu devrait apartenir au même usager que celui utilisé par le service Apache... Dans mon cas, www-data... Alors j'ai fait "chown -R www-data: mediawiki" pour régler mon problème.
... En passant, je ne pense pas que ce soit une bonne idée de tout le mettre en 777, ça peut causer une brèche de sécurité.
My french is rusty, but I think that I agree with you.
Setting 777 permissions is really a bad idea.
On my system, I had this problem too. I got here by googling the error message.
I fixed the problem by setting the image directory's owner to apache. And since nothing but a readme was in that directory, I didn't even need a recursive chown.
chown apache. /var/www/mediawiki119/images
That was the path on my CentOS 6.3 system.
I wonder if there is an even less crude solution.
There is. Read Manual:Configuring file uploads
In my case (ubuntu server 12.04) it was
me@someplace:/var/www/w$ sudo chown -R www-data images/
sudo chown -R www-data:www-data images/
(also make sure permissions are proper)
sudo chmod -R 755 images/
Setting www-data as the owner fixed this issue for me! (Ubuntu server 12.04) Thanks!
copy that ran on Ubuntu 12.04.2 with MW 1.20:
sudo chown -R www-data /var/www/MyWikiName/images
In my case I had a virtual server with a public_html directory in my home folder so I added my user to the www-data group
sudo useradd -G www-data my-username
logged out and back in to have the new group permission take effect and then I did.
sudo chown -R /home/my-username/public_html www-data
and that fixed the problem for me.
Yup. Works on Raspbian too, so this should work for x86, x64 and ARM servers.
I should have been clearer: read https://www.mediawiki.org/wiki/Manual:Configuring_file_uploads#Check_directory_security
That talks about chowning to www-data:www-data.
On my system (CentOS 6.5) it should be apache:apache.
Note that a chgrp isn't necessary since chown incorporates that functionality. An old-fashioned notation for chown used . instead of : to separate the owner from the group.
check your "$wgFileExtensions = {'gif', 'png');" entry
you need to create an array, something like this:
$wgFileExtensions = array('gif','png');
For me chmoding uploads, uploads/*, uploads/*/* uploads/*/*/* to 777 helped (but please check with someone mor wiki-security aware that this doesn't imply any threats). For you it may be images, images/*, ... as it seems our wiki has some special settings.
Making things 777 means any user can write to the directory, which means if anyone somehow gets access to your server (aka security vulnrability in something else), or if there are other users of your server, they can write stuff to the images directory. A better approach is to make the images folder either owned by the apache user, or in the apache's user's group, and only let the apache user have said permissions.
Mi sukcesis per
# chown apache -R /path/to/your/wiki/ # chgrp apache -R /path/to/your/wiki/
I just solved this issue on Fedora by installing mod_fcgid.
I hope this helps someone. :-)
This post was posted by Ogredeschnique~mediawikiwiki, but signed as Ogredeschnique.
made the change [$sudo chmod 777 /etc/mediawiki/images] on Ubuntu 12.04, Mediawiki version 1.22.1
Boom problem gone
Just an update after a few minutes trying to fix that problem on my Mac : I would had this step to solve the access problem :
- add a $wgTmpDirectory = "/Applications/XAMPP/xamppfiles/htdocs/your_wiki/images/temp"; OR whatever path you want... and do the chmod on this specific folder
[$sudo chmod 777 /Applications/XAMPP/xamppfiles/htdocs/your_wiki/images/temp]
Only then you know what the fu** the wiki is doing! ;)
Have fun.
I have the same problem on windows and I have installed wiki under IIS .