diff --git a/buildbot/scripts/runner.py b/buildbot/scripts/runner.py
index 1b66681..d8259c4 100644
--- a/buildbot/scripts/runner.py
+++ b/buildbot/scripts/runner.py
@@ -361,6 +361,13 @@ configfile = r'%(config)s'
 rotateLength = %(log-size)s
 maxRotatedFiles = %(log-count)s
 
+# Sometimes the working directory is not writeable, so we check, then
+# explicitly use basedir if there are problems
+import os
+wd=os.getcwd()
+if not os.access(wd, os.W_OK):
+  print "%s not writeable.  Changing to %s." % (wd, basedir)
+  os.chdir(basedir)
 application = service.Application('buildmaster')
 try:
   from twisted.python.logfile import LogFile

