Subversion on a dual boot machine
Recently, I installed Ubuntu on a laptop with Windows XP. I left a Fat32 volume to share documents between Linux and Windows (since it’s still risky to write to NTFS). I later install subversion on both Windows and Linux Partition and though I could subversion as a document versioning system.
At around version 1.1, Subversion introduced a new file system call FSFS. Previous version of Subversion only supported Berkley DB, which only did not work properly cross platform (you get data corruptions). FSFS is a flat file system that do not have this problem and has been the default file system since version 1.2.
Unfortunately, when I attempt to check in a file to a repository on the FAT32 partiton, I got the following error:
Can’t chmod /myrepository
This was puzzling since chmod essentially does nothing on a Fat32 volume. The error message is deceptive. It appears that chmod is attempting to change permission on Fat32, which doesn’t support it and fails. In reality, the cause of the problem is because the Fat32 volume is typically mounted as root. Since the user is not the owner volume, chmod fails.
You have two solutions:
1. Mount the volume as being owned by you. For example, in the fstab, you can add:
/dev/hda3 /media/hda3 vfat defaults,utf8,umask=007,gid=52,uid=1002 0 1
uid=1002 is my userId. To find out your uid, use the id command. This may not be such a good idea on mult-user machines, but dual boot machines tend to be used primary by one person.
2. Run the svn command using sudo or run as root. Since you are root, you have chmod permission over root owned volumes.
Of course, there are probably more elegant solutions, but this is what I could think of off the top of my head.