Topic on Project:Support desk

[RESOLVED] Could not create directory mwstore://local-backend/local-public/ when Uploading.

6
50.73.149.81 (talkcontribs)

OS Version: CentOs 7 Database: MariaDB Php Version: 5.4.16

Path to installation Sym: /var/www/mediawiki Actual: /var/www/mediawiki-1.23.6

Error Displayed on the page when trying to upload: Could not create directory "mwstore://local-backend/local-public/9/9b". Error from error_log: [:error] [pid 19457] [client 10.107.1.89:58112] PHP Warning: failed to mkdir "/var/www/mediawiki-1.23.6/images/2/22" mode 0777 [Called from wfMkdirParents in /var/www/mediawiki-1.23.6/includes/GlobalFunctions.php at line 2625] in /var/www/mediawiki-1.23.6/includes/debug/Debug.php on line 303

This is an internal wiki so I can't post a link.

Issue: Can't upload file


I've been trying to fix this for a couple days now. I've googled the issue and everyone seems to say it's a permissions issue.

at this point I'm not sure it is (I know what I've done below is very very bad practice, but... it's come to the sledge hammer approach. I will fix this AFTER I can figure out what's breaking)

I've chown'ed the entire /var/www/mediawiki to apache:apache I've chmod -R 777 the entire /var/www/mediawiki folder (At this point there should be NO permission problems whatsoever)

and just to be sure I did the same using the actual path instead of the sym... not that that matters

I've confirmed that apache is running under user apache group apache

There's nothing left for me to open up in permissions... so how can it be a permission issue?

any help would be greatly appreciated.

Ciencia Al Poder (talkcontribs)

The important line here is this one:

failed to mkdir "/var/www/mediawiki-1.23.6/images/2/22" mode 0777 

If permissions are not the issue, maybe you have SELinux or APPArmor enabled, which is preventing the creation of files/folders?

50.73.149.81 (talkcontribs)

I... am an idiot, and you are a wonderful person.

Thank you.

70.55.168.118 (talkcontribs)

Hi, I've been trying to fix this issue also for few days. Here is the situation:

The mediawiki was working on another server, I move the database and the mediawiki folder to the new server which is running Centos 7. First I did

chown -R apache.apache mediawiki 

The mediawiki folder and all files are using the following context

httpd_sys_content_t 

when uploading file I got:

Could not create directory "mwstore://local-backend/local-public/f/f3".

I read and tried a lot of different solution on the web but none are working.

Ciencia Al Poder (talkcontribs)

So you use SELinux. Disable it and see if it works. Then ask on a SELinux forum.

190.210.54.2 (talkcontribs)

I have the same problem!!!!!!!!