[Mediawiki-l] phpsuexec and uploaded file permissions

Platonides Platonides at gmail.com
Tue Sep 25 14:18:27 UTC 2007


Transom wrote:
> After installing phpsuexec, newly uploaded files are no longer accessible.
> 
> The first problem was that MediaWiki wouldn't upload files because it complained the files were corrupt or had bad extensions. That seemed to be a MIME detection issue and my sys admin set $wgMimeDetectorCommand to "file -bi" and that solved that problem.
> Now the files are being uploaded, but newly-uploaded image files are not visible in the wiki. On an Image: page, the image is not displayed  and clicking the image link leads to an Apache error. The newly uploaded files have permissions=644 whereas before they had 755.

> So---are the permissions wrong? I don't know why MediaWiki would need "execute" permissions for images, but when images are 755 it works, and when set to 640, it doesn't.
I guess it has to do with the read permission for everybody, and not 
with the execute permission. Can the files be read by the user under 
which apache runs?


> ALSO... I have noticed that MediaWiki shows a link on the image page for images uploaded in the past, and the MIME type is displayed as "text/plain".
> Both issues lead me to believe there is a filetype/mime issue somewhere and it'[s probably related to something I didn't do right when configuring the system.  
The mime type is stored in the database. As those images were detected 
as text/plain in the past, they're still listed as such. They would be 
correctly detected if you reuploaded them today.




More information about the MediaWiki-l mailing list