As I remarked in a previous tweet, people these days seem surprised when you say you’re not on The Book. So, as I came back after seeing a friend and yet another person asked me to add them as a friend on Facebook, I thought I might reconsider my previous position.

So I signed up… typed in my name, email address etc… and what did I see?

I saw a list of “suggested friends”, which was essentially everyone I knew before I deleted my account, as well as a bunch of people I knew but hadn’t connected to.. the social graph in action I guess.

I would be interested to find out where this information was obtained if my account was truly deleted, from my former connections? But surely, I could be any Marcus Povey? True, emails are “unique”, but I’m fairly sure that at least half of the suggested connections never knew my email address (social graph again)… besides, that’s missing the point.

To be clear, at the very least Facebook is remembering my name/age or email address as unique identifiers, and who I am connected to. So while the delete account option may remove your pictures etc, it clearly doesn’t remove the connection data – which I have previously stated is actually quite a powerful and private bit of information.

Am I alone in being a little freaked out by this?

Clearly, even though they provide a way of deleting your account, much of the important connective information is retained. Your account still isn’t being deleted.

In other words; “You can check out any time you like, but you can never leave”.

Suffice it to say, I reconsidered my reconsideration. I deleted my account again (for what good it will do), my first instinct was correct.

I guess people are just going to have to email me.

Old Skool.

This weekend was Barcamp Oxford, and suffice it to say it was utterly fantastic. While a delicious ham cooks, I just thought I’d jot down some notes.

The day for me started early on Saturday with a walk into town (Oxford’s buses being resoundingly useless), still it was a lovely sunny day and I had some good tunes on my mp3 player so I didn’t mind working on my tan for a while.

Anywho, got to the Oxford Club in time for registration and for the slots to be put up… a dizzying array of very interesting possible discussions were soon put up.

Obviously I couldn’t go to all the sessions, but those I did go to were fantastically useful.

Highlights were a thought provoking, passionate and mature discussion of women in technology, and education in general. Additionally, met a bunch of very cool people who I hope to keep in touch with!

The beeper has just gone on my oven so I must tend to my food. Suffice it to say, I found the event both highly enjoyable, stimulating and very very useful.

Props to all the people who worked so hard to make this happen, you are all awesome!

Same time next year?

Image by Sylwia Presley

ProFTP is a configurable FTP server available on most *nix platforms.

I recently had the need to get this working and authenticating off a PHP maintained MySQL backend, and this post is primarily to aid my own memory should I ever have to do it again.

Installing ProFTP

In order to use MySQL as a back end you need to install some packages. If you’re using a Debian based distro like Ubuntu, this is easy:

apt-get install mysql-server proftpd proftpd-mod-mysql

The database schema

Next, you need to install the database schema to store your users and passwords.

CREATE TABLE IF NOT EXISTS users (
userid varchar(30) NOT NULL default '',
passwd varchar(128) NOT NULL default '',
uid int(11) default NULL,
gid int(11) default NULL,
homedir varchar(255) default NULL,
shell varchar(255) default NULL,
UNIQUE KEY uid (uid),
UNIQUE KEY userid (userid)
) TYPE=MyISAM;

CREATE TABLE IF NOT EXISTS groups (
groupname varchar(30) NOT NULL default '',
gid int(11) NOT NULL default '0',
members varchar(255) default NULL
) TYPE=MyISAM;

One important thing to note here – that caused me a fair amount of hair pulling when I tried to use encrypted passwords – is that the password field shown in many howtos on the internet is much too short. This causes the hashed password to be quietly truncated by MySQL when saved.

This results in a somewhat misleading “No such user found” error to appear in the logs when using encrypted passwords.

To end all argument I’ve allowed passwords up to 128 chars, but this field could probably be a good deal shorter.

The user table looks much like /etc/passwd and is largely self explanatory. The uid & gid fields correspond to a system user in most cases, but since we’re using virtual users they can largely be ignored. Homedir points to a location which will serve as the user’s default directory. Shell is largely unused and can be set to /bin/false or similar.

Configuring ProFTP

Next, you need to make some changes to the ProFTP configuration files stored in /etc/proftpd. While doing this it is handy to run proftp in debug mode from the console:

proftpd -nd6

proftpd.conf

  1. Make sure the AuthOrder line looks like:

    AuthOrder mod_sql.c

  2. Ensure that the following line is uncommented:

    Include /etc/proftpd/sql.conf

  3. For belts and braces I’ve included the following at the end, although I’m not entirely sure it’s strictly required:

    <IfModule mod_auth_pam.c>
    AuthPAM off
    </IfModule>

  4. Our users don’t need a valid shell, so:

    RequireValidShell off

modules.conf

  1. Make sure the following lines are uncommented:

    LoadModule mod_sql.c
    LoadModule mod_sql_mysql.c

sql.conf

  1. Set your SQL backend and ensure that authentication is turned on:

    SQLBackend mysql
    SQLEngine on
    SQLAuthenticate on

  2. Tell proftp how passwords are stored. You have a number of options here, but since I was using mysql’s PASSWORD function, I’ll defer to the backend.

    SQLAuthTypes backend

  3. Tell proftp how to connect to your database by providing the required connection details, ensure that the user has full access to these tables.

    SQLConnectInfo database@host user password

  4. Define your table structure in the format tablename fields….

    SQLUserInfo users userid passwd uid gid homedir shell
    SQLGroupInfo groups groupname gid members

Adding users

I manage users from within a PHP web application that I’m developing, but in a nutshell adding FTP users from this point is a simple insert statement looking something like:

mysql_query("REPLACE INTO users
(userid, passwd, uid, gid, homedir, shell)
VALUES
('$userid', PASSWORD('$password'), $uid, $gid, '$homedir', '$shell')");

Have fun!