After having some problems removing items from the dock on OS X (Mountain Lion) today, I found out that if I reset the access rights on a particular file to give everyone all rights, it worked.
This is the command I used:
sudo chmod 777 ~/Library/Preferences/com.apple.dock.plist
However, I don't particularly like those rights.
When I executed this command before changing to everything:
ls -la ~/Library/Preferences/com.apple.dock.plist
Can anyone tell me what the correct access rights should be?