Where does Drupal store its url/domain name? I created a site using an IP address and imported a live site on another server, then I made the domain name live on the new server created with the IP address.  Since then I get permissions error for the admin when logged into the domain name/ url.  However if the same admin logs in using the IP address, I can see the broken links report. Otherwise it says I don't have permissions.    I'm trying to reset the root domain url but uncommenting it in the settings file doesn't fix the permissions issue. I think it is something deep in the DB
Check https://www.drupal.org/node/776864 under Troubleshooting - No user login. It might help.

Basicly, it says Enable clean URLs, check Apache config, check .htaccess, you probably want to uncomment rewritebase. Also check that "$cookie_domain" is not set to your old domain.