Thread:Project:Support desk/File Upload Error/reply (4)

This is happening to me also on a fresh install on Centos 7 (3.10.0-123.el7.x86_64)

MediaWiki	1.24.1 PHP	5.4.37 (apache2handler) MySQL	5.6.23

I set these debug options in LocalSettings.php:

error_reporting( -1 ); ini_set( 'display_errors', 1 );
 * 1) DEBUG

$wgShowSQLErrors = true; $wgDebugDumpSql = true; $wgShowExceptionDetails = true; $wgShowDBErrorBacktrace = true;

Backtrace:


 * 1) 0 /var/www/html/mediawiki-1.24.1/includes/filerepo/file/LocalFile.php(1174): LocalFile->lock
 * 2) 1 /var/www/html/mediawiki-1.24.1/includes/upload/UploadBase.php(738): LocalFile->upload(string, string, string, integer, array, boolean, User)
 * 3) 2 /var/www/html/mediawiki-1.24.1/includes/specials/SpecialUpload.php(467): UploadBase->performUpload(string, string, boolean, User)
 * 4) 3 /var/www/html/mediawiki-1.24.1/includes/specials/SpecialUpload.php(186): SpecialUpload->processUpload
 * 5) 4 /var/www/html/mediawiki-1.24.1/includes/specialpage/SpecialPage.php(363): SpecialUpload->execute(NULL)
 * 6) 5 /var/www/html/mediawiki-1.24.1/includes/specialpage/SpecialPageFactory.php(584): SpecialPage->run(NULL)
 * 7) 6 /var/www/html/mediawiki-1.24.1/includes/MediaWiki.php(275): SpecialPageFactory::executePath(Title, RequestContext)
 * 8) 7 /var/www/html/mediawiki-1.24.1/includes/MediaWiki.php(584): MediaWiki->performRequest
 * 9) 8 /var/www/html/mediawiki-1.24.1/includes/MediaWiki.php(435): MediaWiki->main
 * 10) 9 /var/www/html/mediawiki-1.24.1/index.php(46): MediaWiki->run
 * 11) 10 {main}

Also, this error appears on-screen after the failed upload (with the above debugging options on):

Warning: fopen(/var/www/html/mediawiki-1.24.1/images/lockdir/dmzfox3ljn7ipsdr0zlw44nwle1qlbp.lock): failed to open stream: No such file or directory in /var/www/html/mediawiki-1.24.1/includes/filebackend/lockmanager/FSLockManager.php on line 125

Warning: failed to mkdir "/var/www/html/mediawiki-1.24.1/images/lockdir" mode 0777 [Called from wfMkdirParents in /var/www/html/mediawiki-1.24.1/includes/GlobalFunctions.php at line 2582] in /var/www/html/mediawiki-1.24.1/includes/debug/MWDebug.php on line 302

If you set a debug.log up, this seems to be the relevant tidbit:

[warning] failed to mkdir "/var/www/html/mediawiki-1.24.1/images/lockdir" mode 0777 [Called from wfMkdirParents in /var/www/html/mediawiki-1.24.1/includes/GlobalFunctions.php at line 2582] [warning] failed to mkdir "/var/www/html/mediawiki-1.24.1/images/lockdir" mode 0777 [Called from wfMkdirParents in /var/www/html/mediawiki-1.24.1/includes/GlobalFunctions.php at line 2582] [warning] failed to mkdir "/var/www/html/mediawiki-1.24.1/images/lockdir" mode 0777 [Called from wfMkdirParents in /var/www/html/mediawiki-1.24.1/includes/GlobalFunctions.php at line 2582] [warning] failed to mkdir "/var/www/html/mediawiki-1.24.1/images/lockdir" mode 0777 [Called from wfMkdirParents in /var/www/html/mediawiki-1.24.1/includes/GlobalFunctions.php at line 2582] [warning] failed to mkdir "/var/www/html/mediawiki-1.24.1/images/lockdir" mode 0777 [Called from wfMkdirParents in /var/www/html/mediawiki-1.24.1/includes/GlobalFunctions.php at line 2582] [warning] failed to mkdir "/var/www/html/mediawiki-1.24.1/images/lockdir" mode 0777 [Called from wfMkdirParents in /var/www/html/mediawiki-1.24.1/includes/GlobalFunctions.php at line 2582] [warning] failed to mkdir "/var/www/html/mediawiki-1.24.1/images/lockdir" mode 0777 [Called from wfMkdirParents in /var/www/html/mediawiki-1.24.1/includes/GlobalFunctions.php at line 2582] [warning] failed to mkdir "/var/www/html/mediawiki-1.24.1/images/lockdir" mode 0777 [Called from wfMkdirParents in /var/www/html/mediawiki-1.24.1/includes/GlobalFunctions.php at line 2582] [warning] failed to mkdir "/var/www/html/mediawiki-1.24.1/images/lockdir" mode 0777 [Called from wfMkdirParents in /var/www/html/mediawiki-1.24.1/includes/GlobalFunctions.php at line 2582] [exception] [2c79a15b] /index.php/Special:Upload  Exception from line 1871 of /var/www/html/mediawiki-1.24.1/includes/filerepo/file/LocalFile.php: Could not acquire lock for 'Images_(18).jpg.'

So, I think it's a permissions thing in general and maybe an SELinux thing in particular? But I can't figure it out. I've set the images dir chmod -R 777. Any idea what's up here?