Topic on Project:Support desk

Jump to navigation Jump to search

"The upload directory (public) is not writable by the webserver."

2
NeoAmsterdam (talkcontribs)

I take it all back: SELinux was blocking uploads and it wasn't reporting the problem...

  • Fedora 14 (x86)
  • MediaWiki 1.15.4
  • PHP 5.3.5
  • MySQL 5.1.55
  • Stock configuration

(Mea culpa: blinded by infuriation and frustration, this should've been posted over at Support Desk. If someone can shift the discussion there, I'd be much obliged.)

OK... I've done this a million ways, and I keep getting this damned "The upload directory (public) is not writable by the webserver" error. Apache is running fine. PHP is running fine. MySQL is running fine. MediaWiki does work, but uploads don't.

Or should that be "won't"? Whatever.... The following "usual suspects" have been ruled out:

  • chmod -R 755 …/images makes no difference
  • chmod -R 777 …/images makes no difference
  • chown apache:apache …/images makes no difference
  • /etc/php.ini has file_uploads = On
  • /etc/httpd/conf/httpd.conf is as it should be (DocumentRoot set to /var/www/html)
  • Aliases in /etc/httpd/conf.d/mediawiki.conf is as it should be (Alias /mediawiki set to /var/www/mediawiki)
  • Adding "error_reporting( E_ALL ); ini_set( 'display_errors', 1 );" to LocalSettings.php revealed nothing (except for a deprecation error involving Extension:Calendar (Cdamian))
  • And even though "uploading" by maintenance/importImages.php works, it is not an acceptable substitute.

After figuring all that out, I cleared out everything and did a fresh installation - I even followed the installation manual to the letter. The only — repeat: only — change to LocalSettings.php was to set $wgEnableUploads to true. No extensions, no add-ons, no plug-ins, no require_once, no nothing, and no dice: the upload directory (public) is still not writable by the webserver.

So... what the hell is going on here? "The upload directory (public) is not writable by the webserver" is complete, total, and utter mother-@#$%ing bull*&^~ (let alone uninformative and borderline grammatical). A heavily-customized installation has this problem, and so does a brand-spanking new installation. What am I overlooking? What haven't I considered? And why, oh, why can't MediaWiki Just @#$%ing Work?!

Thanks for the help (or, at least, the opportunity to vent... >_< )

40%-Dummy (talkcontribs)

Same problem here, apart from the fact that I didn't have SELinux installed... But I tried about everything else first, too. The only way I could finally solve the problem was with chmod -R a+w .../images. No clue why it wasn't enough to give the just user running apache w rights. If anyone has an idea what went wrong or how I can make this more secure (I'm a Linux noob but I think this is a security risk?) please let me know! 40%-Dummy 22:18, 5 December 2011 (UTC)

Reply to ""The upload directory (public) is not writable by the webserver.""