You are doing it correctly, but it won't work on Dreamhost. an excerpt from the Dreamhost Wiki article on Unix File Permissions says:
In reply to:
Every file in Unix is assigned a user. This user is the owner of the file. This user has permission to change the group and mode of the file. No one else (but the administrators) is able to make these changes. Only the administrators can change the owner of a file (there is a work around to this too, though).
This doesn't make much difference on DreamHost, but if you happen to have administrative access elsewhere, this can be useful knowledge. The command to modify the owner is chown.
$ chown bob file.txt
The user named "bob" now owns "file.txt" (that is, if you're the superuser, otherwise, this will fail).
The "work-around" to change file owner for non-superusers is to copy the file(s) to a new location as the user you want to own the files. The files will be owned by this user in the new location. It's not much of a work-around, but it's occasionally useful.
So, without being superuser, you can't run chown on Dreamhost. Maybe the suggested "workaround" will do in a pinch? 
--rlparker