aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Ritter <xeno@thehappy.de>2011-02-07 23:03:23 +0100
committerStefan Ritter <xeno@thehappy.de>2011-02-07 23:11:02 +0100
commitc46d21939017545cc1dd038e732fd868b4d1350b (patch)
treea79c6ca7a3126016c9bcd7109312145c26b85f34
parentc7ac70ff84e89a978d20361987a95c31fc03c071 (diff)
Determine if entries_dir is writable
-rwxr-xr-xblogthon.cgi3
1 files changed, 3 insertions, 0 deletions
diff --git a/blogthon.cgi b/blogthon.cgi
index 0aed854..4f35d81 100755
--- a/blogthon.cgi
+++ b/blogthon.cgi
@@ -120,6 +120,9 @@ if not re.match("^.*\/$", blog_url):
if not os.path.exists(entries_dir):
errorpage("Directory \"%s\" does not exist!" % entries_dir)
+if not os.access(entries_dir, os.W_OK):
+ errorpage("Directory \"%s\" is not writable!" % entries_dir)
+
if not os.path.exists(staticpages_dir):
errorpage("Directory \"%s\" does not exist!" % staticpages_dir)