locked
Access denied message when trying to edit a list item RRS feed

  • Question

  • Guys I have a strange problem that's going on with a Sharepoint list first off I'm running Sharepoint 2007 with SP2. So here goes if I create a new list go in add a few items to the list than try to edit those items I get an access denied. Even though the user that is working on the list has full access to the entire site the list item still kicks out access denied when trying to edit. So my question to you all have you came across anything like this before?
    • Moved by Mike Walsh FIN Wednesday, June 9, 2010 3:13 AM admin q (From:SharePoint - General Question and Answers and Discussion (pre-SharePoint 2010))
    Wednesday, June 9, 2010 12:22 AM

Answers

  • I have encountered the same issue and this is a known MSFT bug. This occurs as the lists or libraries have a missing attribute of permissionMask

    MSFT has addressed this bug after SP2, (Sorry could not find the link now) so any new site collections created after that will not have these issue, but you can encounter it on any existing site collections or subsites.

    Only way to fix this is by updating the list schema and add the missing attribute.

     

          

    Sunday, July 17, 2011 5:34 AM

All replies

  • Hi alphabanks,

     

    Please check if your scenario is as follows:

    • You create a Windows SharePoint Services 3.0 site collection.
    • You export the site collection.
    • You import the site collection into a new site collection.
    • You create a new customized list in the new site collection.
    • You add a new list item and then try to edit the newly-added list item.

    In this scenario, you cannot edit the newly-added list item.

     

    If so, this is a known issue caused by a CU, please follow the KB article http://support.microsoft.com/kb/971351 to resolve your issue.

     

    Lambert Qin

    TechNet Subscriber Support in forum

    If you have any feedback on our support, please contact tngfb@microsoft.com  


    Sincerely,
    Lambert Qin
    Posting is provided "AS IS" with no warranties, and confers no rights.
    Wednesday, June 9, 2010 6:08 AM
  • See also thread :

    http://social.msdn.microsoft.com/Forums/en-US/sharepointadmin/thread/cd973417-db42-43b2-9987-a2d7b0025e71

    I had the same problem..


    Christos
    Wednesday, June 9, 2010 7:24 AM
  • Ok let me give some more detail I'm running Sharepoint 2007 SP2 with April 2010 cumulative update so I'm fully patched. If I create a brand new subsite I still get access denied when trying to edit a list so basically the problem is still there even for newly created subsites however, a newly created top level site can edit the list. I've done lots of research on this and everyone says that this was addressed in Feburary 2009 cumulative update I was already at SP2 so all February 2009 updates were rolled into SP2. Anyway let me know what you guys think I'm out of ideas?
    Sunday, June 13, 2010 1:35 AM
  • Alpha, this just started happening to me in a farm that I've had running for almost 2 years.  All other site collections are fine, but this one site collection is hosed.  I've verified that it's not the file system on the WFE, it's not the web app, and it's not the content database.  Every new list or document library we create in this site collection exhibits the same behavior.  Even as a site collection administrator, I can't edit an item right after I create it, but only in new lists.  All lists that existed before the problem started work fine. We don't know if it was a patch, security update, or what, but luckily it's a pilot system and we are able to move to production in a week or so, but this system is hosed, and I have no idea why.

    You're the first person I've found who had the same problem.  I did find a few other clues.  If I create a new form library, then new forms in that library work fine.  I can edit them after the initial submit, and I can do it from within InfoPath or from SharePoint using the "Edit Properties" method.  Another clue is that if click on the context menu of a new item that doesn't work, I can see the Manage Permissions link.  However, if I click on it, then when I get to the Manage Permissions screen, I can't edit permissions.  I can edit permissions at the list level but not at the item level even though the item inherits from the list.


    SharePoint Architect || Microsoft MVP || My Blog
    Sunday, June 13, 2010 6:00 AM
  • Yes we are in the same boat with this problem all of my list that were before this problem work however any new list trigger access denied errors when trying to perform an edit. I've posted a few links below several of them talk about using code that was provided by an MS support rep. I was able to get the code to work but again this is a poor fix I need a permenant fix  that allows new sites to be error free.  I don't  want to run this exe everytime someone creates a new list. Anyway I'm posting two versions of the code in order to get this up and running you will need to add the following references Microsoft.Sharepoint.dll and System.xml.  In order to add these reference you will go to the Visual Studio Solutions explorer than right click references and select add reference. The Sharepoint.DLL is located in the ISAPI folder in the 12 hive and you can add System.xml by clicking on the .net tab of the add references panel.

    Below I will past two versions of the code I like the first version best because I can click on the exe than do my input the second version needs to be run from the command line where you will pass in all arguments see example below
    C:\Documents and Settings\spadmin\My Documents\Visual Studio 2008\Projects\fix
    list\fixlist\bin\Debug>fixlist.exe http://mycompany.com mylist


    first version of code
    using System;
    using System.Collections.Generic;
    using System.Text;
    using Microsoft.SharePoint;
    using System.Xml;

    namespace CA_TestingHotfix
    {
        class Program
        {
            static void Main(string[] args)
            {
                FixField(args);
            }

            static void FixField(string[] args)
            {
                string RenderXMLPattenAttribute = "RenderXMLUsingPattern";

                Console.WriteLine("Please enter the URL of the site: (Press enter after typing):");
                string weburl = Console.ReadLine();
                //string weburl = args[0];

                Console.WriteLine("Please enter the Document Library Name: (Press enter after typing):");
                string listName = Console.ReadLine();
                //Console.ReadLine();
                //string listName = args[1];
                SPSite site = new SPSite(weburl);
                SPWeb web = site.OpenWeb();
                SPList list = web.Lists[listName];
                SPField f = list.Fields.GetFieldByInternalName("PermMask");
                string s = f.SchemaXml;
                Console.WriteLine("schemaXml before: " + s);
                XmlDocument xd = new XmlDocument();
                xd.LoadXml(s);
                XmlElement xe = xd.DocumentElement;
                if (xe.Attributes[RenderXMLPattenAttribute] == null)
                {
                    XmlAttribute attr = xd.CreateAttribute(RenderXMLPattenAttribute);
                    attr.Value = "TRUE";
                    xe.Attributes.Append(attr);
                }
                string strXml = xe.OuterXml;
                Console.WriteLine("schemaXml after: " + strXml);
                f.SchemaXml = strXml;
            }

        }
    }

    Microsoft Original version
    using System;
    using System.Collections.Generic;
    using System.Text;
    using Microsoft.SharePoint;
    using System.Xml;

    namespace CA_TestingHotfix
    {
        class Program
        {
            static void Main(string[] args)
            {
                FixField(args);
            }

            static void FixField(string[] args)
            {
                string RenderXMLPattenAttribute = "RenderXMLUsingPattern";

                //Console.WriteLine("Please enter the URL of the site: (Press enter after typing):");
                string weburl = args[0];

                //Console.WriteLine("Please enter the Document Library Name: (Press enter after typing):");
                string listName = args[1];
                SPSite site = new SPSite(weburl);
                SPWeb web = site.OpenWeb();
                SPList list = web.Lists[listName];
                SPField f = list.Fields.GetFieldByInternalName("PermMask");
                string s = f.SchemaXml;
                Console.WriteLine("schemaXml before: " + s);
                XmlDocument xd = new XmlDocument();
                xd.LoadXml(s);
                XmlElement xe = xd.DocumentElement;
                if (xe.Attributes[RenderXMLPattenAttribute] == null)
                {
                    XmlAttribute attr = xd.CreateAttribute(RenderXMLPattenAttribute);
                    attr.Value = "TRUE";
                    xe.Attributes.Append(attr);
                }
                string strXml = xe.OuterXml;
                Console.WriteLine("schemaXml after: " + strXml);
                f.SchemaXml = strXml;
            }

        }
    }





    So far I've come across the below links
    http://www.beyondweblogs.com/post/SharePoint-security-access-denied-permission-corruption-problem-Edit-Item-and-Access-Workflows.aspx

    http://social.technet.microsoft.com/Forums/en-US/sharepointadmin/thread/66643b6e-3695-48db-83a5-770282f8251e/

    http://www.sharepointtalk.info/2010/03/access-denied-message-when-trying-to.html

    http://odole.wordpress.com/2009/01/30/access-denied-error-message-while-editing-properties-of-any-document-in-a-moss-document-library/

    http://support.microsoft.com/kb/971351

    • Proposed as answer by XristosK Wednesday, August 25, 2010 10:02 AM
    • Unproposed as answer by Mike Walsh FIN Sunday, July 17, 2011 7:26 AM
    Sunday, June 13, 2010 10:53 PM
  • Yeah, that's nuts.  I don't plan to be adding any code like this.  Do you not yet know what has caused the corruption?
    SharePoint Architect || Microsoft MVP || My Blog
    Sunday, June 13, 2010 11:08 PM
  • I do not know how it happened I plan to read through the links again on Monday. Maybe you can run this by some of the other MVP's in order to get some other thoughts again I also hope a MS rep can chime in.
    Monday, June 14, 2010 1:34 AM
  • I have encountered the same issue and this is a known MSFT bug. This occurs as the lists or libraries have a missing attribute of permissionMask

    MSFT has addressed this bug after SP2, (Sorry could not find the link now) so any new site collections created after that will not have these issue, but you can encounter it on any existing site collections or subsites.

    Only way to fix this is by updating the list schema and add the missing attribute.

     

          

    Sunday, July 17, 2011 5:34 AM