If your iMac came w/system DVDs, do the following:
Disconnect all devices from the computer then do the following:
Boot up from your DVD that originally came w/the iMac while holding down the "c" key.
Select the language you wish to use, and then choose "Disk Utility" from the menu bar.
Your HD should appear in a panel on the left hand side of the window which opens. Select it and then click on the "repair disk" button in the right hand section of the window.
Once this process has been completed restart your computer and repair permissions directly from Disk Utility.
If Disk Utility is unable to complete the repair, you will need to use a stronger 3rd party utility like DiskWarrior, Techtool PRO (not Deluxe) or Drive Genius.