Showing posts with label site permissions. Show all posts
Showing posts with label site permissions. Show all posts
Tuesday, 5 February 2013
For Those Wishing to Enable / Disable / Set Emails for Site Access Requests in an entire Site Collection
might I recommend this script from Michael Allen, which does the job with aplomb!
Thursday, 27 September 2012
Help! I can't create a Site Collection without getting "Access Denied" errors!
Another one of those problems which is a short post but which took me hours upon hours to fix. The error is as follows:
You log into SharePoint Central Admin with the intent of creating a site collection. You go to Applications and do the necessary, ensuring it is added to the correct Web Application yada yada yada. And then you go to the new link for your site collection - because you want to create some sites in it, naturally enough.
Access Denied Error!
Butbutbut - I'm the Farm Administrator! How can this be? How can I not see my own damn site collections?
By the time I had found the solution, via the good offices of google, I was quite ready to be the Funny Farm Administrator. But never mind. I know now what it is.
1. Central Admin. Attempt to access SharedServices1 page. Chances are you will get an Access Denied error
2. Application Management - Policy for Web Application. Is your farm account listed there with Full Control? If not, add it for the relevant Web Application (you'll see the web app filter in the view dropdown on the top right)
3. Still having problem? Go to Operations - Service Accounts. BE VERY CAREFUL ABOUT DOING THIS ON A PRODUCTION SERVER, HAVE A BACKUP FIRST:
Click "Web application pool" option button
Select Web Service - Winds SharePoint Services Web Application
Select Application Pool - usually only Sharepoint - 80 available. That's fine.
Select "Configurable" radio button and enter farm admin account user and password
Click OK
A lot of the links in SharedServices will still be broken but you will be able to view SharedServices1 and more importantly your site collections!
You log into SharePoint Central Admin with the intent of creating a site collection. You go to Applications and do the necessary, ensuring it is added to the correct Web Application yada yada yada. And then you go to the new link for your site collection - because you want to create some sites in it, naturally enough.
Access Denied Error!
Butbutbut - I'm the Farm Administrator! How can this be? How can I not see my own damn site collections?
By the time I had found the solution, via the good offices of google, I was quite ready to be the Funny Farm Administrator. But never mind. I know now what it is.
1. Central Admin. Attempt to access SharedServices1 page. Chances are you will get an Access Denied error
2. Application Management - Policy for Web Application. Is your farm account listed there with Full Control? If not, add it for the relevant Web Application (you'll see the web app filter in the view dropdown on the top right)
3. Still having problem? Go to Operations - Service Accounts. BE VERY CAREFUL ABOUT DOING THIS ON A PRODUCTION SERVER, HAVE A BACKUP FIRST:
Click "Web application pool" option button
Select Web Service - Winds SharePoint Services Web Application
Select Application Pool - usually only Sharepoint - 80 available. That's fine.
Select "Configurable" radio button and enter farm admin account user and password
Click OK
A lot of the links in SharedServices will still be broken but you will be able to view SharedServices1 and more importantly your site collections!
Thursday, 26 April 2012
Argh! I Locked Myself Out!
But I didn't get back in by being given a key - more like kicking the door down, but anyway...
A few days ago I was testing something on the dev machine and removed a few user groups from the site permissions list on a site collection. They were still associated with the site, just had no site permissions. I was logged in as site admin. Went to do something on one of those sites and what do you know, I can't get in! Checked the site collection admin, where I was queen of everything and all looked well. Checked Central Admin and the Sharepoint:80 web application, found my errant site collection, and yes I was site admin. Still couldn't get in.
Here is how I got back in. I do not recommend using this as a method to get in. It is a horrible hack and will consign me to SharePoint Hell. I only did it because it was a dev machine and the outcome was not important. However - it is an example of how to dynamically add an existing SharePoint user group onto a Site Permissions list if it isn't on it already:
A few days ago I was testing something on the dev machine and removed a few user groups from the site permissions list on a site collection. They were still associated with the site, just had no site permissions. I was logged in as site admin. Went to do something on one of those sites and what do you know, I can't get in! Checked the site collection admin, where I was queen of everything and all looked well. Checked Central Admin and the Sharepoint:80 web application, found my errant site collection, and yes I was site admin. Still couldn't get in.
Here is how I got back in. I do not recommend using this as a method to get in. It is a horrible hack and will consign me to SharePoint Hell. I only did it because it was a dev machine and the outcome was not important. However - it is an example of how to dynamically add an existing SharePoint user group onto a Site Permissions list if it isn't on it already:
using (SPSite site = new SPSite("http://notmyemployerssitecoll/sc/sample/"))
{
using (SPWeb web = site.OpenWeb())
{
foreach (SPGroup group in web.AssociatedGroups)
{
if (group.Name.Contains("My Little Lost Group"))
{
//assign it permissions to control everything
//obviously when we do this for real, we want it to grab the
//existing role assignment
SPRoleAssignment roleAssignment = newSPRoleAssignment(web.SiteGroups[group.Name]);
SPRoleDefinitionBindingCollection roleDefinition = roleAssignment.RoleDefinitionBindings;
roleDefinition.Add(web.RoleDefinitions["Full Control"]);
web.RoleAssignments.Add(roleAssignment);
web.Properties[group.Name] = "Full Control";
web.Properties.Update();
}
}
}
}
Subscribe to:
Posts (Atom)