summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Andrews <candrews@integralblue.com>2009-07-21 13:59:34 -0400
committerCraig Andrews <candrews@integralblue.com>2009-07-21 13:59:34 -0400
commit22466530eff42fa6b1e1ea2380227ad5f4b22923 (patch)
tree47f20205bdb1c889ab22315cce507e8a4b0391b5
parenta9613e999f0c55830269daaf0f76fddc6b26d329 (diff)
Fixed: The installer checks if the avatar and background directories are writable, but fails to check the file directory used for attachments.
Thanks brion http://laconi.ca/trac/ticket/1703
-rw-r--r--README11
-rw-r--r--install.php21
2 files changed, 17 insertions, 15 deletions
diff --git a/README b/README
index b65a08d42..0bf1319c6 100644
--- a/README
+++ b/README
@@ -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;