installer permissions check bug
Posted: Fri Dec 08, 2006 11:37 am
I noticed when I was installing serendipity recently that the installer told me my permissions all looked good, and then failed when trying to write the config after the next page because it could not write to 'uploads/'
I discovered that the permissions were set correctly on the basedir, but not on the contained directories (specifically template_c and upload). The installer assumes that if the child directories fail is_writable(), then they must not exist and everything will be ok as long as basedir is writable; which is obviously a bad assumption.
I suggest these changes to include/admin/installer.inc.php: (change applied to ver 1.0.4)
I discovered that the permissions were set correctly on the basedir, but not on the contained directories (specifically template_c and upload). The installer assumes that if the child directories fail is_writable(), then they must not exist and everything will be ok as long as basedir is writable; which is obviously a bad assumption.
I suggest these changes to include/admin/installer.inc.php: (change applied to ver 1.0.4)
Code: Select all
363c363
< if ($basewritable) {
---
> if ($basewritable && !is_dir($basedir . PATH_SMARTY_COMPILE) ) {
379c379
< if ($basewritable) {
---
> if ($basewritable && !is_dir($basedir .'archives/') ) {
397c397
< if ($basewritable) {
---
> if ($basewritable && !is_dir($basedir .'uploads/') ) {