Flame-war starting stuff in bold
Apache is currently 1.3.27 with all the patches I did for CSG, which pretty much makes it 1.3.28. It has my rewrite of Paul Jolly's docsuexec patches in it which work a little like this:
Apache no longer has any say in which user to run a CGI script as, except that it can nominate that it's in a user-homedir. But since hellard doesn't run mod_userdir, that's unimportant. But remember the VirtualHost User and Group directives are now useless.
User information is looked up in the cdb /usr/apache/conf/suexec_map.cdb and the most specific directory given is used. Dumping the file looks a little like this:
+30,27:/usr/apache/htdocs/osc/germany-<www_soc_germanysoc_germany +30,27:/usr/apache/htdocs/rsm/rocksoc-<www_soc_rocksocsoc_rocksoc +31,25:/usr/apache/htdocs/halls/fisher-<www_soc_fishersoc_fisher +34,29:/usr/apache/htdocs/guilds/icracing-<www_soc_icracingsoc_icracing +33,33:/usr/apache/htdocs/acc/rcscricket-<www_soc_rcscricketsoc_rcscricket +30,27:/usr/apache/htdocs/acc/archery-<www_soc_archerysoc_archery +33,29:/usr/apache/htdocs/halls/linstead-<www_soc_linsteadsoc_linstead +33,29:/usr/apache/htdocs/halls/brabazon-<www_soc_brabazonsoc_brabazon +27,21:/usr/apache/htdocs/rcc/dofe-<www_soc_dofesoc_dofe +33,33:/usr/apache/htdocs/acc/volleyball-<www_soc_volleyballsoc_volleyball +28,23:/usr/apache/htdocs/acc/wushu-<www_soc_wushusoc_wushu +32,31:/usr/apache/htdocs/rsm/hispeople-<www_soc_hispeoplesoc_hispeople
As you can see, each section and society has its own group and user. Because of this we can finially stop files with db passwords being readable to everyone. SuEXEC map also sets resource limits, but I haven't configured that yet. Society name must be unique across the whole union.
SuEXEC map also `handles' PHP. Don't ask - it Just Works thanks to the way the CGI standard is written. PHP files aren't bodged via a script that includes them, nor do they need #! lines, nor do they need to be executable.
Permissions are kindof complicated. Each section (where a section is acc or halls) has a directory, as always. It's owned by root and group owned by sec_xyz. So if you are a member of sec_xyz you can write files into that directory.
Within a section, a society (and things like Beit Hall are classed as societies in the halls section) is owned by root and group owned by soc_abc. Thus a person can admin multiple societies by being in multiple groups.
Of course, we want to protect PHP files. Unfortunately, most people don't understand permissions and so society directories are mode 01770. Section directories are not so they still need to explicitly remove the world read flag from their scripts.
But, since the webserver needs to read the files, the ACL looks like:
# file: . # owner: root # group: soc_beit user::rwx user:www:r-x group::rwx group:wizard:rwx group:sec_halls:rwx mask::rwx other::--- default:user::rwx default:user:www:r-x default:group::rwx default:group:wizard:rwx default:group:sec_halls:rwx default:group:soc_beit:rwx default:mask::rwx default:other::---
So user www has special read and search access, as do members of group wizard and sec_abc.
You might ask why I don't do the same trick to the section dirs, but SuEXEC would mean that we had O(n) ACL entries with the number of sections - and O(n) is bad for ACL numbers.
Fortunately, you don't need to set this all up manually. There's a Python script that you can run and it will create everything and set permissions.
Currently it's capable of doing all this and running the Dramsoc website.
An install of RT exists, but I don't really want to use it. A mailing list will do, we don't need a request tracker
Hellard run's qmail with mailman. This already works.
Plans include - letting societies setup their own mailing lists and forwarding providing that the prefix of the address is their society name.
It can currently authenticate off DoC Windows servers - leading me to believe that it will work off ICT servers. I still need to get an ICT password so that I can sort this out. DoC students will need to use their ICT passwordi.
Quotas are enforced per-society. Current value of thumb is 50MB unless you have a reasonable need for more (e.g. Dramsoc, Stoic, Felix).
| / | Root |
| Alternate | The Weird and Wonderful |
| Backlinks | What are backlinks |
| John Gilmore | What's Wrong with Copy Protection |
| Archives | Blog Archives |
| One | Archive 1 |
| Two | Archive 2 |
| Three | Archive 3 |
| Four | Archive 4 |
| Five | Archive 5 |
| Six | Archive 6 |
| Seven | Archive 7 |
| Eight | Archive 8 |
| Nine | Archive 9 |
| Ten | Archive 10 |
| Eleven | Archive 11 |
| Twelve | Archive 12 |
| Thirteen | Archive 13 |
| Fourteen | Archive 14 |
| Fifteen | Archive 15 |
| Sixteen | Archive 16 |
| Seventeen | Archive 17 |
| Eighteen | Archive 18 |
| Nineteen | Archive 19 |
| Twenty | Archive 20 |
| Twenty One | Archive 21 |
| Twenty Two | Archive 22 |
| Twenty Three | Archive 23 |
| Twenty Four | Archive 24 |
| Twenty Five | Archive 25 |
| Twenty Six | Archive 26 |
| Twenty Seven | Archive 27 |
| Twenty Eight | Archive 28 |
| Twenty Nine | Archive 29 |
| Photos | Poor People Caught on Film |
| Jack and the Beanstalk | Jack and the Beanstalk |
| RIP Scan | Results of a Stage Scan Fire |
| Yosemite | Yosemite National Park |
| Projects | Incomplete things from the lab |
| Seagull's Bane | Linux Automounter |
| bttrackd | BitTorrent Tracker |
| CAPTCHA | CAPTCHA CGI script |
| Conserv | Console Serving |
| Deerpark | Using Tor with Firefox/1.1 (Deerpark) |
| DNSFix | Fixing DNS |
| Xovers | XTA Crossover Control |
| IAFS | Archive Org Storage |
| JBIG2 | JBIG2 Encoder |
| Verify | PGP Key Verifier |
| MaxFlow | Maximal Flow in Python |
| PyBloom | Bloom Filters in Python |
| pyGnuTLS | Python wrapping of GnuTLS |
| Sxmap | Apache SuEXEC Map |
| Hellard | Union Server Notes |
| Recordings | Free recordings |
| ICSM Choir | St Paul's Church |
| School | Ancient School Stuff |
| Writings | Who knows |
| Cap Systems | Capability Systems |
| Intro | Introduction to me |
| Suprema | JMC2 Group Project |
| MP Letters | Letters I've written to my MP |
| Sound | Sound With Dramsoc |
| SyncThreading | The wonders of user-land threads |