I've upgraded an Ubuntu PC from 10.04 to 12.04.

Problem is all the permissions were wrong on the home folders.

So, I did the following:

```
sudo chown -R james:james /home/james/*
sudo chown -R james:james /home/james/.*
sudo chown -R htpc:htpc /home/htpc/*
sudo chown -R htpc:htpc /home/htpc/.*

```

But you end up with all the files in both folders either in james:james or htpc:htpc, depending on which way round you run the commands.

How have the become linked and how can I fix it?

As requested:

```
james@htpc:~$ ls -l /home
total 8
drwxr-xr-x 41 james james 4096 May 20 19:32 htpc
drwxr-xr-x 31 james james 4096 May 20 20:04 james
james@htpc:~$ ls -l /home/htpc
total 236
drwxr-xr-x  4 james james   4096 Nov 25 13:19 Desktop
drwxr-xr-x  2 james james   4096 Mar 13  2011 Documents
drwxr-xr-x  5 james james   4096 Dec 22  2010 Downloads
-rw-r--r--  1 james james    179 Nov 18  2010 examples.desktop
-rwxr-xr-x  1 james james     85 Dec 27  2010 goback
-rw-r--r--  1 james james    425 Nov 28  2010 modelines
drwxr-xr-x  5 james james   4096 Dec 27  2010 Music
drwxr-xr-x 22 james james   4096 Oct 29  2012 Pictures
drwxr-xr-x  2 james james   4096 Nov 18  2010 Public
drwxr-xr-x  2 james james   4096 Nov 18  2010 Templates
-rwxr-xr-x  1 james james    251 Dec 27  2010 testmode
drwxr-xr-x  2 james james   4096 Dec 23  2010 Videos
-rwxr-xr-x  1 james james 190672 Nov  6  2010 winetricks
james@htpc:~$ 

```