1

Have got a SharePoint 2013 installation running as a development system (cloned from our live environment).

If I create a new site collection and set the primary and secondary site collection administrators to sp_farm and sp_admin respectively, I am able to access (view) the website using either of these two accounts - great.

However, after restoring a site collection (using PowerShell Restore-SPSite) from our live SharePoint farm into our development server, it seems that something strange is happening with the permissions on the restored collection. Everything looks OK configuration wise, e.g. both sp_farm and sp_admin are in the site Owners group with full control. I can even access the website via the browser fine using sp_farm. The problem is that for some reason I cannot access the site using sp_admin. I am greeted with the usual message "Sorry, this site hasn't been shared with you" - despite being set as an admin for the site collection.

I figured that I would set up access requests for the site collection - so I submitted an access request as user sp_admin. I then go to the access requests management area using sp_farm, see the request from sp_admin, and I give sp_admin full control rights. However, upon re-accessing the site with sp_admin I am told to submit an access request again. At this point surely I should have access?

I have tried numerous suggestions including:

  • Clearing browser cache
  • Restart Microsoft SharePoint Foundation Web Application
  • Restarting the server
  • Checked that claims authentication is being used (as per the live environment)
  • Tried clearing and re-adding sp_admin into various groups with full control
  • Tried giving site collection administration rights to a different Windows User Account (this worked - I could access the site as soon as I'd added the user)

Really stumped here as to why the sp_admin account is not working, as the environment should be fully reflective of our live environment.

Like I said, creating a new site collection with exactly the same permissions gives me no problems. The problem only occurs after I've restored a site collection from our live environment.

I have read that clearing the Distribution Cache may be an option?

Does anybody else have any suggestions? Thanks

  • Have you tried to set sp_admin to primary owner? You could try to set sp_admin using powershell and see if it make's any difference. How did you attach the database to the web application? Could you try to detach and re-attach the database? – Christoffer Oct 17 '14 at 16:10
  • Set-SPSite -identity "ttp://server/sites/sitename" -SecondaryOwnerAlias "DOMAIN\sp_admin" – Christoffer Oct 17 '14 at 16:12
  • Thanks for the suggestions, I shall try these and let you know how it went. (Haven't got enough points to reply directly sorry) – The Judge Oct 17 '14 at 20:38
  • Is dev connected to dame domain or a different one? – Jesus Shelby Oct 18 '14 at 0:07
  • Hi Jesus, both dev and live are using the same domain name, however the two environments are not on the same network therefore the domains are not connected. Perhaps some kind of conflict where SP is getting confused that the domain names are the same name but is not the actual same domain? – jules Oct 18 '14 at 8:56
0

I would like to credit user19952 for pointing me in the right direction. I tried to set the primary and secondary site collection admins by using PowerShell commands instead of via Central Admin. It appeared that user "sp_admin" was now being recognised as a different user to what it was before. (Perhaps some kind of cache within SharePoint was cleared when we set the alias via the script?)

After running the below command we were still unable to access the site with sp_admin, but were able to make an access request, which upon being accepted by sp_farm, gave access to the user sp_admin. Previously, approving the access request appeared to do nothing and sp_admin could still not access the site.

To summarise, I don't know exactly what the script did - but it appeared to fix our problem.

$siteCollectionUrl = "<my site>"
$site =new-object Microsoft.SharePoint.SPSite($siteCollectionUrl)
$web = $site.RootWeb
$primarAdministrator = $web.EnsureUser("domain\sp_admin")
$site.Owner = $primarAdministrator;
Set-SpSite "<my site>" -owneralias "domain\sp_admin"

$secondayAdministrator = $web.EnsureUser("domain\sp_farm")
$site.SecondaryContact = $secondayAdministrator;
Set-SpSite "<my site>" -SecondaryOwnerAlias "domain\sp_farm"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.