[Mediawiki-l] Upload Folder Permissions

Transom transomsailor at excite.com
Thu Oct 4 15:35:54 UTC 2007


This is a more accurate description of a problem described earlier.



I can't get MediaWiki uploads to work. The upload appears to work properly, but the image does not show on the Image: page. There is a link to the image. When clicked, Apache reports that "You don't have permission to access <path> on this server.". The problem is that permissions on the image directory subdirectories are set to 744 rather than 755. For example:



 ... /wiki/images/7/72 = 744

 ... /wiki/images/7/72/Testupload.png = 644



If I manually change permissions on "/wiki/images/7/72" to 755, all is well.



I have looked at the code and as far as I can tell, MediaWiki attempts to set the permissions to 755. I can't tell why the actual permission is set differently. I don't see any issue with umask and I don't see a chmod that modifies the permissions after the subdirectory is created. I am no expert on PHP or permissions so I definitely could have missed something. Given what I saw in the PHP code, I think the problem is a configuration issue of some kind, perhaps a security setting that is preventing PHP from creating the folder with execute permission.



Here is some background information that might be relevant.



 MediaWiki: 1.11.0

 MySQL: 4.1.22-standard

 Linux 2.6.19.2-grsec

 PHP: 5.2.4

 phpsuexec

 safe_mode is off

 open_base_dir is unset



When MediaWiki was installed, I was _not_ using phpsuexec. Some files and folders were originally owned by "nobody", but I changed them to the user where the MediaWiki PHP is running now. Everything in MediaWiki other than uploads appears to be working properly.



Any help you can offer will be greatly appreciated. I've tried looking at the code, posting here, posting to the MediaWiki Project:Support desk, and Googling various terms to see if someone else has encountered the problem. No joy yet.



_______________________________________________
Join Excite! - http://www.excite.com
The most personalized portal on the Web!





More information about the MediaWiki-l mailing list