1.1 --- a/tools/Apache/config.py Sun May 01 13:56:53 2005 +0000
1.2 +++ b/tools/Apache/config.py Sun May 01 13:57:03 2005 +0000
1.3 @@ -168,6 +168,31 @@
1.4 except ImportError:
1.5 print "Not configuring the sessions directory ownership."
1.6
1.7 + # Check the permissions on the application.
1.8 +
1.9 + if app_type == "CGI":
1.10 + try:
1.11 + import stat
1.12 + details = os.stat(app_location)
1.13 + mode = stat.S_IMODE(details[stat.ST_MODE])
1.14 +
1.15 + # Check for incorrect permissions.
1.16 +
1.17 + flags = stat.S_IRUSR|stat.S_IXUSR|stat.S_IRGRP|stat.S_IXGRP|stat.S_IROTH|stat.S_IXOTH
1.18 +
1.19 + # Set correct permissions.
1.20 +
1.21 + if mode & flags == flags:
1.22 + print "Correct permissions found were", oct(mode), "for", app_location
1.23 + else:
1.24 + answer = raw_input("Change the permissions on %s? (Y|N) " % app_location)
1.25 + if answer.upper() == "Y":
1.26 + print "Setting mode", oct(flags), "on", app_location
1.27 + os.chmod(app_location, flags)
1.28 +
1.29 + except ImportError:
1.30 + print "Not changing the permissions on the application."
1.31 +
1.32 print "--------"
1.33 print "Configuration completed."
1.34 print "You may need to run an administrative tool to add the new site '%s' to Apache." % site_name