Python Community Server: Development

A weblog about programming in Python, C#, Java, Perl and C++ - and the occasional comment on PyCS development
new: discuss community servers on the CommunityServerWiki!

SunMonTueWedThuFriSat
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31

[ Sep ] [ Nov ]

the locals
also available in XML
Copyright (c) 2002 Phillip Pearson
spread the dot

2002-10-3

Shared hosting permissions

It must suck to run a shared web host, because it doesn't look like there's any way to get the permissions sorted out right so that everybody's scripts work but nobody can hack anybody.

I've been trying to get phpStorageSystem running on www.myelin.co.nz, and have run into the huge brick wall that is PHP safe mode. It's really irritating. I want to create a subdirectory of a directory I (user 'myelin') own, so I do it:

mkdir( 'foo' );

Now I want to save a file in there:

$file = fopen( 'foo/bar.txt', 'wt' );
fwrite( $file, "Hello, world!" );
fclose( $file );

But no, that doesn't work, because I don't own the new directory. What sort of logic is that? You can't do anything with files you don't own, but when you create new files, they are owned by the web server, so you can't do anything with them. Argh!

Sigh ... time to write a Python script (which will run quite happily as a CGI, which means it gets to completely bypass all the "safe mode" restrictions) to take all my PHP scripts and copy them into a new directory that is owned by the web server. That way my scripts will be able to write to their own directories, with any luck.

By the way, the Python Community Server's weblog updates page now finally does what it's meant to: provide a rolling list of the blogs that have updated in the last 24 hours. Before this, it showed you all the blogs that had ever updated, and in the wrong order, to boot. We're coming up for version 0.09 ... ;)

Comment on this post [ so far]

First of month bug fixed!

Comment on this post [ so far]

Incremental changes to phpStorageSystem

Now in phpStorageSystem CVS: the weblog updates page works.

PSS is getting there. All that remains is the visitor tracking stuff.

Comment on this post [ so far]