Having trouble editing Finder settings using defaults write
First of all you shouldn't need sudo and it may have caused the permissions issue, and no need to use the full pathname, just:

defaults write com.apple.finder ShowHardDrivesOnDesktop -boolean TRUE


The following works for me, as is, in OS X 10.8.5 and macOS 10.12.5 in both a Standard and Admin Account in Terminal.

defaults write com.apple.finder ShowHardDrivesOnDesktop -boolean TRUE; killall Finder


Using FALSE, in place of TRUE hides the e.g. Macintosh HD on the Desktop.

I'd probably opt to either restore the file from a known good backup or delete the ~/Library/Preferences/com.apple.finder.plist file and then run killall Finder in Terminal, letting it rebuild and should resolve the permissions issue as well.