“Sorry, this site hasn’t been shared with you.” This seems to be a common message SharePoint 2013 users are seeing if things aren’t configured correctly. There may be a variety of reasons why you are seeing this message. In my case it was happening when I tried to go to particular site admin (_layouts) pages and seemed to be caused by the site collection not being correctly provisioned. To overcome the problem it was necessary to do the following:
1. Go to Central Admin. Click on the “Application Management” heading.
2. Click on “Manage services on server”.
3. Stop the service “Microsoft SharePoint Foundation Web Application”. This will take a little while to stop.
4. Start the above service again.
This should resolve the problem.