diff options
-rw-r--r-- | README | 11 | ||||
-rw-r--r-- | install.php | 21 |
2 files changed, 17 insertions, 15 deletions
@@ -262,13 +262,16 @@ especially if you've previously installed PHP/MySQL packages. that user's default group instead. As a last resort, you can create a new group like "mublog" and add the Web server's user to the group. -4. You should also take this moment to make your avatar subdirectory - writeable by the Web server. An insecure way to do this is: +4. You should also take this moment to make your avatar, background, and + file subdirectories writeable by the Web server. An insecure way to do + this is: chmod a+w /var/www/mublog/avatar + chmod a+w /var/www/mublog/background + chmod a+w /var/www/mublog/file - You can also make the avatar directory writeable by the Web server - group, as noted above. + You can also make the avatar, background, and file directories + writeable by the Web server group, as noted above. 5. Create a database to hold your microblog data. Something like this should work: diff --git a/install.php b/install.php index bae296a35..1d3a531c5 100644 --- a/install.php +++ b/install.php @@ -70,17 +70,16 @@ function checkPrereqs() $pass = false; } - if (!is_writable(INSTALLDIR.'/avatar/')) { - ?><p class="error">Cannot write avatar directory: <code><?php echo INSTALLDIR; ?>/avatar/</code></p> - <p>On your server, try this command: <code>chmod a+w <?php echo INSTALLDIR; ?>/avatar/</code></p> - <? - $pass = false; - } - if (!is_writable(INSTALLDIR.'/background/')) { - ?><p class="error">Cannot write background directory: <code><?php echo INSTALLDIR; ?>/background/</code></p> - <p>On your server, try this command: <code>chmod a+w <?php echo INSTALLDIR; ?>/background/</code></p> - <? - $pass = false; + // Check the subdirs used for file uploads + $fileSubdirs = array('avatar', 'background', 'file'); + foreach ($fileSubdirs as $fileSubdir) { + $fileFullPath = INSTALLDIR."/$fileSubdir/"; + if (!is_writable($fileFullPath)) { + ?><p class="error">Cannot write <?php echo $fileSubdir; ?> directory: <code><?php echo $fileFullPath; ?></code></p> + <p>On your server, try this command: <code>chmod a+w <?php echo $fileFullPath; ?></code></p> + <? + $pass = false; + } } return $pass; |