Grounding.co.za

Technology information for IT specialists
Welcome to Grounding.co.za Sign in | Join | Help
in Search

Neil's IW Space

Information Worker Blog's by Neil van Wyngaard

Access Denied on a Sharepoint Site when editing Master Pages

In the last two weeks I have encountered two customers that have experienced this problem, therefore it seems logical that more people are going to encounter this problem. This is not an actual error on Sharepoint, but more a misunderstanding of how Sharepoint works and handles Master Pages.

The problem occurs when people start using Sharepoint Designer to change or apply a new master page to a Sharepoint Site and follow the normal sequence of events:

  1. Create a new Master Page or Download a new master page.
  2. Apply the master page to a Sharepoint site.
  3. Save or publish the site with the new master page.

SPD Master Page

At this point the problem occurs. You will find that when navigating to the Sharepoint site, that the site collection or site administrators can view the site perfectly, but all the users get an error "Access Denied".

The default reaction at this point would be to go and check the security settings, which is what people do. They spend hours changing security and testing and all to no avail. This is due to the fact that the problem lies with the new Master Page and not the security.

To understand the solution to the perceived problem you need to understand where Master Pages are stored in Sharepoint and also how they are managed.

  • Master pages are stored in the "Master Page Gallery" at the site collection level.
  • The gallery is merely a document library that saves web pages, specifically Master Pages and Page Layouts.
  • There is an "Approval" workflow rule attached to this document library for security reasons.
  • New Master pages and page layouts therefore need to be approved before they can be applied.

The problem occurs when the master page is published from Sharepoint Designer. SPD publishes the master page into the "Master Page Gallery", but the workflow rule then kicks in and places the page into an unapproved state. This is what causes the "Access Denied" error for the users of the site.

To fix the problem is quite easy:

  • Navigate to the site settings page
  • Select the Master page gallery from the list of options.
  • Navigate down the list of master pages and page layouts in the gallery to the master page causing the problem.
  • Choose the drop down arrow next to the page and select "Publish" from the drop down menu.
  • Choose the drop down arrow next to the page and select "Approve" from the drop down menu.
  • The status of the page should now have changed from "Draft" to "Approved". Problem Solved.
Publish Approve

I hope you find this blog useful if you ever encounter this problem and please post comment on your experiences.

Related Blogs:

Minimal Master page in Sharepoint Designer

Creating a new Sharepoint site using Sharepoint Designer

Giving Anonymous Access to Users on a SharePoint Site

Comments

 

venkatx5 said:

Thanks a lot Dude.. Will use if I face this Issue in Future..

June 5, 2008 3:18 AM
 

Zodd said:

I thought this was going to solve my issue but when I went to the master page gallery my master page was already in an approved status.

June 18, 2008 10:44 AM
 

Zodd said:

Just thought I would give a follow up on what solved my issue.

Add your user account to the "Policy For Web

Applications" screen. To do this, log in to Central Administrator and

select the Applications tab. Click "Policy For Web Applications".

Click "Add Users". Choose the right web application and All Zones.

Click Next. Choose your user account and make sure it resolves using

the People Picker. Give the account "Full Control" and click "Finish".

June 18, 2008 11:01 AM
 

Neil said:

Thanks for the feedback Zodd.

I will take a closer look at the "Policy for Web applications" and investigate excatly how it works.

Maybe I will write a blog about it!

June 18, 2008 11:20 AM
 

Neil said:

Update

I did decide to write that blog about "Web Application Polies":

grounding.co.za/.../controlling-security-in-sharepoint-using-quot-web-application-policies-quot.aspx

June 23, 2008 8:49 AM
 

Liliana said:

Hi,

I have the same problem with an aspx page created in SharePoint Designer. A user with full control permissions can open the page, but a user with read only permissions cannot.

Where do I find the page stored to change the satus???

July 13, 2008 4:23 AM
 

Neil said:

Hi Liliana

There are quite a number of reasons that this can occur, but I will give you some ideas on where to go and look to solve this problem:

1: In SPD you can alter the security of the site and page from the "Contributor" and "permission settings" on the menu bar.

2: Add the users in sharepoint to the "Viewers" permission group and not just "Readers"

3: Give the users "read" permission on the web application using "Web Application Policy's"

Hope this helps!

July 15, 2008 3:26 AM
 

Garth said:

Liliana,

I just had a similar issue to you.  I was logging in as my user account (not the admin account).  My user account was part of the site  owners and thus has Full Control. But I still got the error.

I then added my account to the Designer group and it now works.

Hope this helps

July 21, 2008 6:40 AM
 

Wali said:

I am having this serious problem, I am loggin into the sharepoint designer with the admin user but if I try to check out any layout file in the master page gallery, it is giving me error "access denied". Could any one help me.

July 23, 2008 4:30 AM
 

Neil said:

Hi Wali.

Unfortunately there are so many reason that this can occur that it is difficult for me to give you a straight answer. The best I can do is relay some of my experience.

I have encounter this same problem in the past using SPD when the Master page or Page layout became corrupt. This is unfortunately very easy to do. Add a web part to a master page and check it in and publish. The master page will immediatly be corrupted and you wil get the access denied error in sharepoint.

The only way i found to fix this is to go to the "Master Page Gallery" under site settings and revert to the previous version.

I have also had this problem when one of the features in a Sharepoint site whent corrupt. Try re-installing the feature if you have any custom ones.

August 7, 2008 8:11 AM
 

HazardousPanic said:

Greetings,

Working with SP2007 I uploaded to the SP Server a template from MS

(www.microsoft.com/.../details.aspx)

I created a sub site using the template provided.

I set up an activity, but when someone clicks on Sign up you get the dread "access denied"

If I make them a owner of the site or sub site still no go. I did what Zodd did in web apps but that gives them admin control over the whole site and sub sites.

Any other ideas?

September 16, 2008 8:58 AM
 

HazardousPanic said:

Ok after a few days of looking, publishing, deleting, publishing, deleting (You get the idea here) I found this solution...

I opened up the Site using the Sharepoint Designer. Then i right-clicked the workflows folder and chose properties. In the Security Tab i clicked the link "Manage Permissions using the browser". Then a new Browser window opened and i was able to adjust the rights for the Workflow Folder. In my case the rights inheritance was broken. I restored it and it worked.

It appears that Workflows when created do not have any permissions set.

September 19, 2008 5:59 AM
 

Frazzled said:

Hi -

I am having the same problem as HazardousPanic - am using WSS 3.0 and the evaluation version of Sharepoint Designer. I was able to upload the horizon sharepoint master page to my sites and set is as the default master page, which was great. But now, I get Server error: Access denied when I try to either reload it to a site that already has it, or load it up to a new site. I have tried messing with access control and deleting and recreating sites to no avail. I have unrestricted Contributor access in Sharepoint designer and Full access to the sites being modified. I opened the site in Sharepoint designer and didn't find a Workflow folder (under _cts have Workflow Task and Workflow History - both are empty) and Contributor settings folder which has one htm document. Can you please provide more detail on how you fixed this? I have a deadline on Tuesday....

Thanks,

Frazzled...

September 24, 2008 7:17 AM
 

bneal said:

We are having a similiar problem with the Access Denied on a Sharepoint Site when editing Master Pages. Although our problem is not returning any errors but rather is not using the new master pages. i tried several of the options noted in some of the previous posts but no change. Adding users to the Designer group takes care of the problem but that is not a desirable solution for obvious reasons. Does anyone have any other ideas we could try? Thanks

September 24, 2008 8:58 AM
 

Neil said:

When a master page is built, it references content from various locations within in Site itself. This could be an image sitting in the "site collection images" folder or even text stored in and xml document within the site collection.

When any users attempts to load the master page, their permissions are checked on all the various folders and locatons referenced by the master page. If any of these locations (and this could be 1 in 300 for example) does not allow that specific user access, then the entire master page gets an "Access Denied" or "Unauthorized" error.

This is common problem with self built or custom master pages.

The problem with many of the downloaded master pages is that they are built on the publishing feature that comes with MOSS 2007 and not is not available in WSS. This could then cause the Master Page on WSS to attempt to reference a fictional folder that does not exists on WSS and then it also fails.

Try switching on the debug mode in the web.config file and see what you get. grounding.co.za/.../getting-quot-debug-info-quot-for-a-sharepoint-error.aspx

September 24, 2008 11:11 PM
 

jackiinthegreen said:

Neil,

I have a forms based auth WSS 3.0 site. What I'm seeing is that authenticated users with read level permissions can see the whole site and use the pages, but get the access denied error page the first time they click on a link in the area of the customzed master page; after that, though, they are fine and can use those links. It's just the links in the master page, not the pages themselves.

Any ideas?

Thanks!

December 5, 2008 3:25 PM
 

kazaki said:

actually it is so usefull i have tried it and it is working

but also this issue applies on the case when you tak a copy of the master page

Thanks

June 20, 2011 9:19 AM
 

Editing custom master pg. gives “Access Denied” | Q&A System said:

Pingback from  Editing custom master pg. gives “Access Denied” | Q&A System

December 21, 2011 1:41 AM
 

Editing custom master pg. gives “Access Denied” | Q&A System said:

Pingback from  Editing custom master pg. gives “Access Denied” | Q&A System

December 21, 2011 1:41 AM

About Neil

Neil van Wyngaard is a MCSE, MCSD, MCDBA, MCT, MCTS, MCITP, MCBMSS. Neil's core industry focus is CRM, ERP, EPM and ECM implementations in the enterprise environment. Core technology focus is based on SQL Server, Visual Studio, WSS, MOSS and OCS
Add to Technorati Favorites
Powered by Community Server (Commercial Edition), by Telligent Systems
Afrigator