Can a user with Contribute privileges invoke SPFolder.SubFolders.Add(folder) Sharepoint 2010 API in a Webservice?

We have a Webservice deployed on a Sharepoint 2010 deployment with a method as follows:
public static string ensureParentFolder(SPWeb parentSite, string destinationUrl)
destinationUrl = parentSite.GetFile(destinationUrl).Url;
int index = destinationUrl.LastIndexOf("/");
string parentFolderUrl = string.Empty;
if (index > -1)
parentFolderUrl = destinationUrl.Substring(0, index);
SPFolder parentFolder
= parentSite.GetFolder(parentFolderUrl);
if (!parentFolder.Exists)
SPFolder currentFolder = parentSite.RootFolder;
foreach (string folder in parentFolderUrl.Split('/'))
try
currentFolder = currentFolder.SubFolders.Add(folder);
catch (Exception ex)
FINEOSLogger.Medium(LoggerCategory.FINEOSToSharePointDMS, "User could not create SP folder so elevating permissions");
SPSecurity.RunWithElevatedPrivileges(delegate()
currentFolder = currentFolder.SubFolders.Add(folder);
return parentFolderUrl;
When invoked by a User with only Contribute rights the SubFolders.Add( ) call appears to fail and the
SPSecurity.RunWithElevatedPrivileges
code is invoked, which also fails.
1. So the first question is should you be able to invoke SubFolders.Add() with only Contribute?  It works with Design privileges for the Customer.  You can add folders on the Sharepoint website as a Contribute user so why not on the API. 
Customer raising this as a security concern.
2. Also why would the
SPSecurity.RunWithElevatedPrivileges
part fail, is the syntax incorrect for Sharepoint 2010?  We migrated this code from Sharepoint 2007 project.
The error I get when I try run the code as a Contribute user is
com.fineos.ta.dms.external.DMSException: The exception [A SharePoint error occured "An Error occured in SharePoint". For user "FINEOS\bryces" uploading the file "Ru Ext_1501.txt", with title "Ru Ext_1501.txt", to the SharePoint Library "FINEOSDocumentLibrary/2015/02/23/13/18".] was caused by the exception [A SharePoint error occured "An Error occured in SharePoint". For user "FINEOS\bryces" uploading the file "Ru Ext_1501.txt", with title "Ru Ext_1501.txt", to the SharePoint Library "FINEOSDocumentLibrary/2015/02/23/13/18".]., Ta Exception info,Exception Class=class com.fineos.ta.dms.external.DMSException,Root cause ID=10,Root cause host=IEL163,Localized message=A SharePoint error occured "An Error occured in SharePoint". For user "FINEOS\bryces" uploading the file "Ru Ext_1501.txt", with title "Ru Ext_1501.txt", to the SharePoint Library "FINEOSDocumentLibrary/2015/02/23/13/18"
at com.fineos.integration.dms.internal.thirdparty.GenericDMS.add(GenericDMS.java:149)
at com.fineos.frontoffice.documentmanager.DocumentManager.saveToThirdPartyDMS(DocumentManager.java:280)
at com.fineos.frontoffice.documentmanager.fileupload.UploadDocumentWidget.save(UploadDocumentWidget.java:401)
at org.apache.jsp.sharedpages.documentmanager.fileupload.uploaddocumentpage_jsp._jspService(uploaddocumentpage_jsp.java:77)
Caused by: com.fineos.integration.dms.external.services.SharePointDmsException: A SharePoint error occured "An Error occured in SharePoint". For user "FINEOS\bryces" uploading the file "Ru Ext_1501.txt", with title "Ru Ext_1501.txt", to the SharePoint Library "FINEOSDocumentLibrary/2015/02/23/13/18".
at com.fineos.integration.dms.external.services.GenericDMSClient.uploadDocument(GenericDMSClient.java:139)
at com.fineos.integration.dms.internal.thirdparty.GenericDMS.add(GenericDMS.java:132)
... 88 more
Caused by: org.apache.axis2.AxisFault: Error_occured_sharepoint [Message Details = An Exception occurred in SharePoint; System.UnauthorizedAccessException: <nativehr>0x80070005</nativehr><nativestack></nativestack>Access denied.
at Microsoft.SharePoint.Library.SPRequest.AddOrDeleteUrl(String bstrUrl, String bstrDirName, Boolean bAdd, UInt32 dwDeleteOp, Int32 iUserId, Guid& pgDeleteTransactionId)
at Microsoft.SharePoint.SPFolderCollection.AddInternal(String strUrl, Int32 userId)
at FINEOSIntegration.FINEOSToSharePointDMS.SharePointDMSUtilities.<>c__DisplayClass9.<ensureParentFolder>b__5()
at Microsoft.SharePoint.SPSecurity.<>c__DisplayClass4.<RunWithElevatedPrivileges>b__2()
at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode)
at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(WaitCallback secureCode, Object param)
at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(CodeToRunElevated secureCode)
at FINEOSIntegration.FINEOSToSharePointDMS.SharePointDMSUtilities.ensureParentFolder(SPWeb parentSite, String destinationUrl)
at FINEOSIntegration.FINEOSToSharePointDMS.FINEOSToSharePointDMS.uploadDocument(String UserName, String FolderPath, String Filename, Byte[] File, DocumentProperties DocumentProperties, Boolean NotifyFINEOS, Boolean NotifyFINEOSSpecified, Boolean OverwriteIfExists, Boolean OverwriteIfExistsSpecified, String& DMSDocType)]
at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:512)
at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:370)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:416)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
at com.fineos.frontoffice.thirdpartydms.operationtypes.ThirdPartyDmsServicesStub.uploadDocument(ThirdPartyDmsServicesStub.java:761)
at com.fineos.integration.dms.external.services.GenericDMSClient.uploadDocument(GenericDMSClient.java:119)
... 89 more
Note that the user SPWeb being passed into the method is from an impersonated user, don't know if that matters.
So the webservice payload contains the id of the user who wants to do the Sharepoint work while the webservice is invoked by anonymous or some other service user.  We then impersonate the user specified in the webservice payload like follows and use
that web SPWeb from then on in the webservice methods:
userToImpersonate = currentWeb.AllUsers[user];
site = new SPSite(fileUrl, userToImpersonate.UserToken);
web = site.OpenWeb();
Any help appreciated.
Thanks,
Ruairi.

Ideally, a user with Contribute permissions should be able to add folders. Not sure what is the issue there. But I can see that SPSecurity.RunWithElevatedPrivileges is not written properly. You must create a new SPSite object inside the delegate
because SPSite objects created outside do not have Full Control even when referenced inside the delegate. Use the using keyword to ensure that the object is disposed in the delegate. Example:
SPSecurity.RunWithElevatedPrivileges(delegate()
using (SPSite site = new SPSite(web.Site.ID))
// implementation details omitted
});See this for more information about SPSecurity.RunWithElevatedPrivilegeshttps://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spsecurity.runwithelevatedprivileges%28v=office.12%29.aspx?f=255&MSPPError=-2147217396
Blog | SharePoint Learnings CodePlex Tools |
Export Version History To Excel |
Autocomplete Lookup Field

Similar Messages

  • Create user with select privilege only one schema

    can someone tell me how i can create user with select priviliges only one schema.
    i don't want the user to have any select privileges with other schema.
    can someone advise me.
    Thansk

    In general, you would do something like
    CREATE ROLE abc_read_only;
    FOR x IN (SELECT * FROM dba_tables WHERE owner='ABC')
    LOOP
      EXECUTE IMMEDIATE 'GRANT SELECT ON abc.' || x.table_name || ' TO abc_read_only';
    END LOOP;
    CREATE USER your_user ...;
    GRANT abc_read_only TO your_userYou create a role, grant the role SELECT access to all the tables in the ABC schema (you can extend this to grant access to views, functions, etc depending on the requirements), and then grant that role to your user.
    Justin

  • Proxy user with limited privileges

    Hi Expert,
    Wanted to know if there is any way to restrict proxy user with certain privileges.
    For an example, If i'm logging in as fnadvi[scott]/password....in this certain circumstances, fnadvi would override all the privileges from SCOTT user.
    And can do insert/update/delete/select whatever under schema SCOTT.
    <quote>
    BANNER
    Oracle Database 11g Release 11.2.0.2.0 - 64bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    CORE 11.2.0.2.0 Production
    TNS for Linux: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production
    </quote>
    Is there any way, that I can setup for user:fnadvi to select certain tables, update certain tables and so on?
    The default proxy user can do anything as SCOTT can do.
    Thanks

    Nadvi wrote:
    Hi Expert,
    Wanted to know if there is any way to restrict proxy user with certain privileges.
    For an example, If i'm logging in as fnadvi[scott]/password....in this certain circumstances, fnadvi would override all the privileges from SCOTT user.
    And can do insert/update/delete/select whatever under schema SCOTT.
    <quote>
    BANNER
    Oracle Database 11g Release 11.2.0.2.0 - 64bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    CORE 11.2.0.2.0 Production
    TNS for Linux: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production
    </quote>
    Is there any way, that I can setup for user:fnadvi to select certain tables, update certain tables and so on?
    The default proxy user can do anything as SCOTT can do.
    ThanksThe short answer is NO.
    With Oracle everything is prohibited, except that which is explicitly GRANTED.

  • Create user with dba privileges

    How do I create a user with DBA privileges in Oracle? The user should be able to create, insert, delete, truncate and other functions without any limits. Do I have to issue GRANT statements?

    Hi,
    I don't believe there's any way to create a user and grant privileges in one command.
    First, create the user:
    CREATE USER  foo  IDENTIFIED BY  bar;Then grant the privileges. There's a pre-defined role called DBA that has all the privileges you mentioned.
    GRANT  dba  TO  foo;It's easy to write a script to do these two commands together, so you could say
    @CREATE_USER  foo  bar  dba

  • How to create full new user with all privileges

    how to create full new user with all privileges?
    and how to delete existing users?
    Thanks in advance..

    Common solution is probably to use sudo for privilege elevation, wiki should help

  • Using an NT user with DBA privileges does not permit to create schema : why ?

    Hi,
    I use an Oracle 8 on an Windows NT server.
    I have two NT users with DBA privileges.
    But, when I use the migration workbench to create the oracle schema, my users are not granted.
    Why ?
    Regards.
    Pascal

    Please clarify your problem.
    The workbench creates users (which are visible in the oracle model within the tool) with the password oracle .
    I am not sure if you are asking about accessing the database using your OS user identity, or have you found that the users exist but do not have dba privileges.
    Turloch
    Oracle Migration Workbench Team
    null

  • Issue with list saving data after sites upgrade from sharepoint 2010 to sharepoint 2013

    Issue with list saving data after sites upgrade from sharepoint 2010 to sharepoint 2013 
    Newform.aspx of list:-
    Custom List is not saving data sometimes in the new form after 15 minutes and only blank entry record got created without saving data, even though some columns are mandatory fields?

    Hello dcakumar,
    Sounds like a strang issue. If you can reproduce this can you see some errors in the ULS logs?
    - Dennis | Netherlands | Blog |
    Twitter

  • SP2010: Users with Contribute rights can Add but not edit items in Calendar View

    Hello,
    One of our users was recently trying to update a Calendar item in the Calendar view, but was unable to do so. Here are the facts of the case:
    - The members of the user's group have Contribute rights on the Calendar list, and on each of the specific Calendar items tested
    - I logged in as a member of the same group and am able to Add items in the calendar view, but when I click on an item title the Ribbon options (including Edit) are not available - whether I created the item or not
    - While logged in as a member of that group, I can edit calendar items using the Allitems view, using the dropdown menu and Edit Item (if I click on the item title, I get the item details without the Ribbon)
    - I created a new Calendar view ("Calendar2") but the problem was the same
    When logged in with admin rights, I get the Edit ribbon when I click on an item title from the Calendar view. Is there a way to do the same for non-admin users? Thanks. 

    Hi,
    According to your post, my understanding is that you were able to add items into a Calendar List, but you couldn’t edit some items of the Calendar List in Calendar View as a member of your group with Contribute rights. And if you edit the Calendar List’s
    items in the “All Events” view or log in with admin rights, you can edit these items.
    Therefore, I wonder if you use the “Calendar Overlays” to display some items of other Calendar Lists in the current Calendar List as John suggested.
    And if you don’t have permissions to edit items of other Calendar Lists, you can’t edit those items of other Calendar Lists in the current Calendar List in Calendar View.
    So, I recommend that you should check if using the “Calendar Overlays” to display some items of other Calendar Lists in the current Calendar List at first.
    If yes, you need to check if you have permissions to edit items of other Calendar Lists.
    For test, I suggest that you can create a new Calendar List and test to see how it works.
    Best Regards,
    Thanks
    Victoria Xia
    TechNet Community Support

  • Access Denied for User with Contribute Rights to a SP list

    I have two users that I have given Contribute Rights on a SharePoint 2010 site - the SP list in question is inheriting permissions from the Parent site, as well as other lists in the site. These two users can edit items in the all other lists on the
    site except for this one in question.
    It is only one list that they cannot view or edit list items. They can view the items in the list, but when they try to open an item in display or edit form, it gives the access denied.
    Other users on the site are NOT having these issues - with the same permissions.
    I researched this problem and have tried various solutions with no luck. I have checked to see that there are NO item level permissions set up; I have deleted the user from the site collection, then added them back, with no luck.
    I am at a loss on what to do.
    Please help

    Timestamp               Process                                
     TID    Area                           Category                     
     EventID Level      Message  Correlation
    03/11/2014 10:41:06.17  OWSTIMER.EXE (0x01E4)                    0x0AD0 SharePoint Server Search       Administration               
     dmg4 Verbose  Groups for process identity 'DOMAIN\spadmin': 'DOMAIN\Domain Users', 'Everyone', 'SHAREPOINT\WSS_ADMIN_WPG', 'SHAREPOINT\WSS_RESTRICTED_WPG_V4', 'SHAREPOINT\WSS_WPG', 'BUILTIN\IIS_IUSRS', 'BUILTIN\Performance Monitor Users', 'BUILTIN\Users',
    'BUILTIN\Administrators', 'NT AUTHORITY\SERVICE', 'CONSOLE LOGON', 'NT AUTHORITY\Authenticated Users', 'NT AUTHORITY\This Organization', 'NT SERVICE\SPTimerV4', 'LOCAL', 'DOMAIN\Group Policy Creator Owners', 'DOMAIN\Department_Schedules_ReadWrite', 'DOMAIN\Sage50_ReadWrite',
    'DOMAIN\GrainCleaners_ReadWrite', 'DOMAIN\Domain Admins', 'DOMAIN\IT Department', 'DOMAIN\RDP_Users', 'DOMAIN\Engineering_ReadWrite', 'DOMAIN\Inventory_ReadWrite', 'DOMAIN\Schema Admins', 'DOMAIN\FabTrol', 'DOMAIN\Enterprise Admins', 'DOMAIN\Software', 'DOMAIN\Denied
    RODC Password Replication Group',  17e8c7b4-fa35-4040-ac83-fe55f721590d
    03/11/2014 10:41:06.17  OWSTIMER.EXE (0x01E4)                    0x0AD0 SharePoint Server Search       Administration               
     dmg1 High     Group WSS_WPG... 17e8c7b4-fa35-4040-ac83-fe55f721590d
    03/11/2014 10:41:06.17  OWSTIMER.EXE (0x01E4)                    0x0AD0 SharePoint Server Search       Administration               
     dmg2 High     Group WSS_WPG: DOMAIN\spadmin 17e8c7b4-fa35-4040-ac83-fe55f721590d
    03/11/2014 10:41:06.17  OWSTIMER.EXE (0x01E4)                    0x0AD0 SharePoint Server Search       Administration               
     dmg2 High     Group WSS_WPG: NT AUTHORITY\LOCAL SERVICE 17e8c7b4-fa35-4040-ac83-fe55f721590d
    03/11/2014 10:41:06.17  OWSTIMER.EXE (0x01E4)                    0x0AD0 SharePoint Server Search       Administration               
     dmg2 High     Group WSS_WPG: DOMAIN\spservice 17e8c7b4-fa35-4040-ac83-fe55f721590d
    03/11/2014 10:41:06.17  OWSTIMER.EXE (0x01E4)                    0x0AD0 SharePoint Server Search       Administration               
     dmg2 High     Group WSS_WPG: DOMAIN\SearchSvc 17e8c7b4-fa35-4040-ac83-fe55f721590d
    03/11/2014 10:41:06.17  OWSTIMER.EXE (0x01E4)                    0x0AD0 SharePoint Server Search       Administration               
     dmg2 High     Group WSS_WPG: DOMAIN\spContent 17e8c7b4-fa35-4040-ac83-fe55f721590d
    03/11/2014 10:41:06.17  OWSTIMER.EXE (0x01E4)                    0x0AD0 SharePoint Server Search       Administration               
     dmg2 High     Group WSS_WPG: DOMAIN\WebAnalProcessSvc 17e8c7b4-fa35-4040-ac83-fe55f721590d
    03/11/2014 10:41:06.17  OWSTIMER.EXE (0x01E4)                    0x0AD0 SharePoint Server Search       Administration               
     dmg2 High     Group WSS_WPG: DOMAIN\svcAppPoolSecure 17e8c7b4-fa35-4040-ac83-fe55f721590d
    03/11/2014 10:41:06.17  OWSTIMER.EXE (0x01E4)                    0x0AD0 SharePoint Server Search       Administration               
     dmg2 High     Group WSS_WPG: NT AUTHORITY\SYSTEM 17e8c7b4-fa35-4040-ac83-fe55f721590d
    03/11/2014 10:41:06.17  OWSTIMER.EXE (0x01E4)                    0x0AD0 SharePoint Server Search       Administration               
     dmg1 High     Group WSS_ADMIN_WPG... 17e8c7b4-fa35-4040-ac83-fe55f721590d
    03/11/2014 10:41:06.17  OWSTIMER.EXE (0x01E4)                    0x0AD0 SharePoint Server Search       Administration               
     dmg2 High     Group WSS_ADMIN_WPG: BUILTIN\Administrators 17e8c7b4-fa35-4040-ac83-fe55f721590d
    03/11/2014 10:41:06.17  OWSTIMER.EXE (0x01E4)                    0x0AD0 SharePoint Server Search       Administration               
     dmg2 High     Group WSS_ADMIN_WPG: DOMAIN\spadmin 17e8c7b4-fa35-4040-ac83-fe55f721590d
    03/11/2014 10:41:06.17  OWSTIMER.EXE (0x01E4)                    0x0AD0 SharePoint Server Search       Administration               
     dmg2 High     Group WSS_ADMIN_WPG: DOMAIN\rawtecadmin 17e8c7b4-fa35-4040-ac83-fe55f721590d
    03/11/2014 10:50:15.56  w3wp.exe (0x0098)                        0x19B8 SharePoint Foundation        
     Monitoring                     b4ly Medium   Leaving Monitored Scope (Request (GET:https://portal.emw.ca:443/ehs/Lists/InvestigationReports/DispForm.aspx?ID=40&Source=https%3A%2F%2Fportal%2Eemw%2Eca%2Fehs%2FLists%2FInvestigationReports%2FMyInvestigations%2Easpx&ContentTypeId=0x0100E352DB580E29424FB1C52A1D93E09345&IsDlg=1)).
    Execution Time=115.2334 0c90a46f-e4ea-46b5-a566-e7a9f404c0aa
    03/11/2014 10:50:15.66  w3wp.exe (0x0098)                        0x16CC SharePoint Foundation        
     Monitoring                     nasq Medium   Entering monitored scope (Request (GET:https://portal.emw.ca:443/ehs/_layouts/AccessDenied.aspx?Source=https%3A%2F%2Fportal%2Eemw%2Eca%2Fehs%2FLists%2FInvestigationReports%2FDispForm%2Easpx%3FID%3D40%26Source%3Dhttps%253A%252F%252Fportal%252Eemw%252Eca%252Fehs%252FLists%252FInvestigationReports%252FMyInvestigations%252Easpx%26ContentTypeId%3D0x0100E352DB580E29424FB1C52A1D93E09345%26IsDlg%3D1&Type=list&name=%7BD3F44F01%2DC738%2D409A%2DA491%2DDD0F905CC83B%7D&IsDlg=1)) 
    03/11/2014 10:50:15.66  w3wp.exe (0x0098)                        0x16CC SharePoint Foundation        
     Logging Correlation Data       xmnv Medium   Name=Request (GET:https://portal.emw.ca:443/ehs/_layouts/AccessDenied.aspx?Source=https%3A%2F%2Fportal%2Eemw%2Eca%2Fehs%2FLists%2FInvestigationReports%2FDispForm%2Easpx%3FID%3D40%26Source%3Dhttps%253A%252F%252Fportal%252Eemw%252Eca%252Fehs%252FLists%252FInvestigationReports%252FMyInvestigations%252Easpx%26ContentTypeId%3D0x0100E352DB580E29424FB1C52A1D93E09345%26IsDlg%3D1&Type=list&name=%7BD3F44F01%2DC738%2D409A%2DA491%2DDD0F905CC83B%7D&IsDlg=1) 9446cae0-8ef5-4ffa-aad8-798d3139a2e7

  • Create user with DBA privileges with a restriction to access user data

    Hi
    I need to create a user with all DBA privileges with a restriction to access all user schemas
    Thanks,
    Balaji

    Use Database Vault - http://download.oracle.com/docs/cd/E11882_01/server.112/e16544/toc.htm
    HTH
    Srini

  • Random users receive an unexpected error when trying to access SharePoint 2010 farm.

    Over the past few months we had occasions where established users trying to connect to my production SharePoint 2010 farm receive a correlation error page when trying to access the farm. I have two WFEs load balanced and the errors show up on either so it
    doesn't happen on just on or the other. Specifically today it was three users in one office  out of about 15 that were affected the rest were able to access the farm without any problems and there were no other reports from other offices. Each time the
    user can eventually get in without any outside intervention it just seems to fix itself after a few hours. Each time it happens I search the logs for the CorrelationID(s) and everytime I see the same set of errors in the ULS logs. I also go check the Windows
    Security logs to make sure they connected to the server okay. I've confirmed that the Web App's PortalSuperUserAccount and PortalSuperReaderAccount are both set correctly. Just looking to see if anyone has experienced this and figured what was happening and
    how to fix it.
    These are the log entries:
    Name=Request   (GET:http://infoshare.swic.edu:80/SitePages/Home.aspx)
    Begin Query the AD to get the user email   and display name.
    End Query the AD to get the user email   and display name.
    Leaving Monitored Scope   (GetFileAndMetaInfo). Execution Time=29.4404440877166
    Leaving Monitored Scope   (GetWebPartPageContent). Execution Time=29.6140602113035
    Site=/
    Leaving Monitored Scope   (PostResolveRequestCacheHandler). Execution Time=30.6330444222452
    SPWeb is missing it's CurrentUser for   user 'SHAREPOINT\system'.
    PortalSiteMapProvider was unable to fetch   current node, request URL: /SitePages/Home.aspx, message: Object reference   not set to an instance of an object., stack trace:   
    at   Microsoft.SharePoint.SPUser.get_UserToken()    
    at   Microsoft.SharePoint.Publishing.CommonUtilities.<>c__DisplayClass1.<RunWithElevatedSite>b__0()    
    at   Microsoft.SharePoint.SPSecurity.<>c__DisplayClass4.<RunWithElevatedPrivileges>b__2()    
    at   Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated   secureCode)    
    at   Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(WaitCallback   secureCode, Object param)    
    at   Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(CodeToRunElevated   secureCode)    
    at Microsoft.SharePoint.Publishing.CommonUtilities.RunWithElevatedSite(SPSite   siteNonEle...
    ...v, Boolean allowUnsafeUpdates,   ElevatedSiteProcessor callWithElevatedSite)    
    at   Microsoft.SharePoint.Publishing.CacheManager..ctor(SPSite site)    
    at Microsoft.SharePoint.Publishing.CacheManager.GetManager(SPSite   site, Boolean useContextSite, Boolean allowContextSiteOptimization)    
    at   Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapProvider.get_ObjectFactory()    
    at   Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapProvider.get_CurrentNode()
    SPWeb is missing it's CurrentUser for   user 'SHAREPOINT\system'.
    DelegateControl: Exception thrown while   adding control 'ASP._controltemplates_metadatanavtree_ascx': Object reference   not set to an instance of an object.
    Setting [Display] as the   FormContext.FormMode for the current page
    SPWeb is missing it's CurrentUser for   user 'SHAREPOINT\system'.
    PortalSiteMapProvider was unable to fetch   root node, request URL: /SitePages/Home.aspx, message: Object reference not   set to an instance of an object., stack trace:   
    at   Microsoft.SharePoint.SPUser.get_UserToken()    
    at   Microsoft.SharePoint.Publishing.CommonUtilities.<>c__DisplayClass1.<RunWithElevatedSite>b__0()    
    at   Microsoft.SharePoint.SPSecurity.<>c__DisplayClass4.<RunWithElevatedPrivileges>b__2()    
    at   Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated   secureCode)    
    at   Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(WaitCallback   secureCode, Object param)    
    at   Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(CodeToRunElevated   secureCode)    
    at Microsoft.SharePoint.Publishing.CommonUtilities.RunWithElevatedSite(SPSite   siteNonElev, ...
    ...Boolean allowUnsafeUpdates,   ElevatedSiteProcessor callWithElevatedSite)    
    at   Microsoft.SharePoint.Publishing.CacheManager..ctor(SPSite site)    
    at Microsoft.SharePoint.Publishing.CacheManager.GetManager(SPSite   site, Boolean useContextSite, Boolean allowContextSiteOptimization)    
    at   Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapProvider.get_ObjectFactory()    
    at   Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapProvider.get_TryGetRootNode()
    SPWeb is missing it's CurrentUser for   user 'SHAREPOINT\system'.
    PortalSiteMapProvider was unable to fetch   root node, request URL: /SitePages/Home.aspx, message: Object reference not   set to an instance of an object., stack trace:   
    at   Microsoft.SharePoint.SPUser.get_UserToken()    
    at   Microsoft.SharePoint.Publishing.CommonUtilities.<>c__DisplayClass1.<RunWithElevatedSite>b__0()    
    at   Microsoft.SharePoint.SPSecurity.<>c__DisplayClass4.<RunWithElevatedPrivileges>b__2()    
    at   Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated   secureCode)    
    at   Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(WaitCallback   secureCode, Object param)    
    at   Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(CodeToRunElevated   secureCode)    
    at Microsoft.SharePoint.Publishing.CommonUtilities.RunWithElevatedSite(SPSite   siteNonElev, ...
    ...Boolean allowUnsafeUpdates,   ElevatedSiteProcessor callWithElevatedSite)    
    at   Microsoft.SharePoint.Publishing.CacheManager..ctor(SPSite site)    
    at Microsoft.SharePoint.Publishing.CacheManager.GetManager(SPSite   site, Boolean useContextSite, Boolean allowContextSiteOptimization)    
    at   Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapProvider.get_ObjectFactory()    
    at   Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapProvider.GetRootNodeCore()
    Exception in   SearchBoxEx::CreateChildControls:System.ArgumentException: Requested value   '/sites/search/Pages/' was not found.      
    at System.Enum.Parse(Type enumType, String value, Boolean ignoreCase)    
    at   Microsoft.SharePoint.Portal.WebControls.SearchBoxEx.GetSiteDefaultsInner(PortalWebSiteMapNode   rootWeb, SPSite site)    
    at   Microsoft.SharePoint.Portal.WebControls.SearchBoxEx.<>c__DisplayClass2.<GetSiteDefaults>b__0()    
    at   Microsoft.SharePoint.SPSecurity.<>c__DisplayClass4.<RunWithElevatedPrivileges>b__2()    
    at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated   secureCode)    
    at   Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(WaitCallback   secureCode, Object param)    
    at   Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(CodeToRunElevated...
    ... secureCode)    
    at   Microsoft.SharePoint.Portal.WebControls.SearchBoxEx.GetSiteDefaults()    
    at   Microsoft.SharePoint.Portal.WebControls.SearchBoxEx.CreateChildControls()
    SPWeb is missing it's CurrentUser for   user 'SHAREPOINT\system'.
    Failed to create a custom control   'PublishingSiteActionsMenuCustomizer', feature 'Publishing'   (id:22a9ef51-737b-4ff2-9346-694633fe4416) using attributes (ControlSrc='',   ControlAssembly='Microsoft.SharePoint.Publishing,
    Version=14.0.0.0,   Culture=neutral, PublicKeyToken=71e9bce111e9429c',   ControlClass='Microsoft.SharePoint.Publishing.WebControls.PublishingSiteActionsMenuCustomizer':   System.Reflection.TargetInvocationException: Exception has been thrown
    by the   target of an invocation. ---> System.NullReferenceException: Object   reference not set to an instance of an object.    
    at   Microsoft.SharePoint.SPUser.get_UserToken()    
    at   Microsoft.SharePoint.Publishing.CommonUtilities.<>c__DisplayClass1.<RunWithElevatedSite>b__0()    
    at   Microsoft.SharePoint.SPSecurity.<>c__DisplayClass4.<RunWithElev...
    ...atedPrivileges>b__2()    
    at   Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated   secureCode)    
    at   Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(WaitCallback   secureCode, Object param)    
    at   Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(CodeToRunElevated   secureCode)    
    at   Microsoft.SharePoint.Publishing.CommonUtilities.RunWithElevatedSite(SPSite   siteNonElev, Boolean allowUnsafeUpdates, ElevatedSiteProcessor   callWithElevatedSite)    
    at   Microsoft.SharePoint.Publishing.CacheManager..ctor(SPSite site)    
    at   Microsoft.SharePoint.Publishing.CacheManager.GetManager(SPSite site, Boolean   useContextSite, Boolean allowContextSiteOptimization)    
    at Microsoft.SharePoint.Publishing.WebControls.CombinedBasePermissions..ctor()    
    at Microsoft.ShareP...
    ...oint.Publishing.WebControls.ConsoleVisibleUtilities.get_CanShowSiteActionsMenuItems()    
    at   Microsoft.SharePoint.Publishing.WebControls.PublishingSiteActionsMenuCustomizer..ctor()    
    at   System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean   skipVisibilityChecks, Boolean fillCache)      
    --- End of inner exception stack trace ---    
    at System.RuntimeType.CreateInstanceImpl(Boolean   publicOnly, Boolean skipVisibilityChecks, Boolean fillCache)    
    at System.Activator.CreateInstance(Type   type, Boolean nonPublic)    
    at   Microsoft.SharePoint.Utilities.SPUtility.CreateServerControlFromAssembly(String   sControlAssembly, String sControlClass)      
    at   Microsoft.SharePoint.SPControlElement.BuildCustomControl(TemplateControl   tctlPage, String sControlAssembly, String sControlClass, String sCon...
    ...trolSrc, XmlNode xnElementDefinition,   SPFeatureDefinition featdefElement, String sElementId)    
    at   Microsoft.SharePoint.SPCustomActionElement.BuildCustomControl(TemplateControl   tctlParent)    
    at   Microsoft.SharePoint.WebControls.FeatureMenuTemplate.CreateChildControls().
    SPWeb is missing it's CurrentUser for   user 'SHAREPOINT\system'.
    System.NullReferenceException: Object   reference not set to an instance of an object.   
    at   Microsoft.SharePoint.SPUser.get_UserToken()    
    at Microsoft.SharePoint.Publishing.CommonUtilities.<>c__DisplayClass1.<RunWithElevatedSite>b__0()    
    at   Microsoft.SharePoint.SPSecurity.<>c__DisplayClass4.<RunWithElevatedPrivileges>b__2()    
    at   Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated   secureCode)    
    at   Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(WaitCallback   secureCode, Object param)    
    at   Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(CodeToRunElevated   secureCode)    
    at   Microsoft.SharePoint.Publishing.CommonUtilities.RunWithElevatedSite(SPSite siteNonElev,   Boolean allowUnsafeUpdates, ElevatedSiteProcessor callWithElevatedSite)    
    at M...
    ...icrosoft.SharePoint.Publishing.CacheManager..ctor(SPSite   site)    
    at   Microsoft.SharePoint.Publishing.CacheManager.GetManager(SPSite site, Boolean   useContextSite, Boolean allowContextSiteOptimization)    
    at   Microsoft.SharePoint.Publishing.WebControls.ConsoleUtilities.IsMasterPageGalleryUrlForSite(Uri   uri)    
    at   Microsoft.SharePoint.Publishing.WebControls.ConsoleVisibleUtilities.ConsoleAppliesInCurrentContext()    
    at   Microsoft.SharePoint.Publishing.Internal.WebControls.PublishingRibbon.OnLoad(EventArgs   e)    
    at   System.Web.UI.Control.LoadRecursive()      
    at System.Web.UI.Control.LoadRecursive()    
    at   System.Web.UI.Control.LoadRecursive()      
    at System.Web.UI.Control.LoadRecursive()    
    at   System.Web.UI.Control.LoadRecursive()      
    at System.Web.UI.Control.LoadRecursive()    
    at System.Web...
    ....UI.Control.LoadRecursive()    
    at   System.Web.UI.Control.LoadRecursive()      
    at System.Web.UI.Control.LoadRecursive()    
    at System.Web.UI.Page.ProcessRequestMain(Boolean   includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    Leaving Monitored Scope (Request   (GET:http://infoshare.swic.edu:80/SitePages/Home.aspx)). Execution   Time=78.9268136821824

    Hi LonF1,
    For solving your issue, please try to update the SuperUser and SuperReader per the article below:
    http://technet.microsoft.com/en-us/library/ff758656.aspx
    $wa = Get-SPWebApplication -Identity "<WebApplication>"
    $wa.Properties["portalsuperuseraccount"] = "<SuperUser>"
    $wa.Properties["portalsuperreaderaccount"] = "<SuperReader>"
    $wa.Update()
    If this issue still exists, please feel free to let me know.
    Best Regards,
    Wendy
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Wendy Li
    TechNet Community Support

  • Issue with Copy of events from Outlook Calendar to SharePoint 2010 calendar(mapped in outlook)

    There is a issue while copying events in Outlook mapped SharePoint 2010 Calendar.
    This issue only seems to happen when user copies an event from his Outlook calendar to the SharePoint 2010 calendar. 
    He is able to create a new event in the SharePoint calendar from Outlook. 
    He tried below steps, but still no success
    1.
    Open your Outlook calendar.
    2. Open the event you want to copy.
    3. From the File menu, select Info.
    4. Click the Move to Folder button.
    5. In the Copy Items To dialog box, scroll down to the SharePoint Lists item and select the SharePoint calendar to which you want to copy the event.
    6. Click the OK button.
    7. Click the Yes button when prompted to continue. 
    Please let me know if there is any possible solution for it.

    Hi,
    I have done a test as your steps. I am able to copy an event from my Outlook calendar to the SharePoint 2010 calendar.
    1. I suggest you test in another compute, perhaps your Outlook results to that issue.
    2. Please create a new site collection, then test again, compare the result.
    3. Maybe it will take some time before the copied event displays in the SharePoint 2010 calendar. So, wait a minute, compare the result. 
    Best Regards,
    Wendy Li
    TechNet Community Support

  • Can I create a User with Root Privileges but without UID Zero?

    Dear all,
    I'm working on this project and this is the task required: Create a user and let this user perform all that the ROOT user can perform but shouldn't have UID 0. I'm sincerely new to this task but I challenged myself and made so many search on Google and this is what I was able to do.
    1. I created a user --- testuser1
    2. I created a role --- advrole
    3. I added the Solaris predefined profile -- Primary Administrator Profile to the role advrole and added this role to the user testuser1.
    4. I logged out from root and login with the newly created user i.e. testuser1.
    5. I ran the command id and the user - testuser1 still has its UID defined by me when I was creating the user account (which is good as far as my task is concern).
    6. In order to perform ROOT tasks when logged in with testuser1, I use su - advrole.
    7. I can now do all that ROOT can do but whenever I run the id command, the advrole shows UID 0 (WHICH IS BAD FOR ME AS PER MY TASK).
    My question is, I need to tell the customer that what they actually want isn't feasible in Solaris and the above is closer to what they want but I need to be sure if it's feasible or not before telling my customer?
    Can anyone tell me if it's feasible and if so, how can it be done? Or if the way I did it is the only way, kindly let me know as well so that I can get back to them with a valid and concrete explanation.
    P. S. The customer requires this because when doing auditing, their auditing software tracks users based on UID so therefore if every user will login and su - root, all will appear as done by the ROOT user because of the UID and a particular will not be held responsible.

    If you use auditreduce and praudit, you can get the information you need. It will show, as in my example below, that I logged in via SSH, and then switched to root after logging in. This information can be easily scripted and I do so every day in my daily report so I can see who logged in and who switched to root.
    Logging in via ssh:
    header,69,2,login - ssh,,MYSYSTEM,2010-06-03 09:15:15.151 -07:00
    subject,myusername,myusername,mygroup,myusername,mygroup,11435,512647774,15097 65558 MyIP
    return,success,0Then switching to root:
    header,94,2,su,,MYSYSTEM,2010-06-03 09:15:21.100 -07:00
    subject,myusername,root,mygroup,myusername,mygroup,11448,512647774,15097 65558 MyIP
    text,success for user root
    return,success,0It also indicates the session ID for the SSH session, so I can monitor when that session ended too.
    A different session logging in and out via SSH -
    header,69,2,login - ssh,,MYSYSTEM,2010-06-03 09:16:19.380 -07:00
    subject,myusername,myusername,mygroup,myusername,mygroup,11451,3474846213,15097 131094 MyIP
    return,success,0
    header,69,2,logout,,MYSYSTEM,2010-06-03 09:16:51.452 -07:00
    subject,myusername,myusername,mygroup,myusername,mygroup,11451,3474846213,15097 131094 MyIP
    return,success,0

  • Only users with admin privileges can connect to shares

    i have set up a 10.6.4 server but only admin users can see the shares.
    other users can connect but no shares appear. (their connection appears in the log and on 10.3.9 you get a blank list of shares available)
    i do have the users set via POSIX as the group owner (all users are in the assigned group).
    i have propogated the permissions as well.
    i did alter the access pane to make it so all could use AFP.
    i tried making it restricted and adding all groups and users to no avail.
    i feel it's something pretty silly i'm missing.
    any advice would be appreciated.

    bzzzz wrote:
    i have set up a 10.6.4 server but only admin users can see the shares.
    other users can connect but no shares appear. (their connection appears in the log and on 10.3.9 you get a blank list of shares available)
    i do have the users set via POSIX as the group owner (all users are in the assigned group).
    i have propogated the permissions as well.
    i did alter the access pane to make it so all could use AFP.
    i tried making it restricted and adding all groups and users to no avail.
    i feel it's something pretty silly i'm missing.
    any advice would be appreciated.
    Two possibilities spring to mind -
    1. The Service security settings may not allow users to connect, look in Server Admin, click on the Access icon at the top, check the security settings for the AFP service.
    2. ACLs (Access Control Lists) override the POSIX security settings, and Leopard and Snow Leopard much prefer using ACLs (Tiger like POSIX better). If no ACLs are defined for a directory then the POSIX permissions apply.

  • Creating portal users with owner privileges?

    Hello,
    I need to let local adminstrators create users in the portal.
    This is based on instance-specific privileges, not global.
    Setting them to 'owners' of the group in the portal should let them add users.
    Once created and I log in as one of them I do not have the privileges of being an
    'owner', eventhough it's visible in the portal that I am an owner.
    Anybody?
    /

    Hi,
    To make the problem a little clearer.
    I want to have "local adminstrators" that can manage portal users i.e; delete, insert and update portal users.
    However I do not want these "local administrators" to be "Full administrators"- too dangerous.
    The "local adminstrators" should belong to the same group as the users they are set to administer. The
    only difference between a "local administrator" and a user of a group is that the "local administrator" have privileges
    to manage the other users of the group. If I have understood the concept right an owner have these privileges.
    I made them owners of the group, but this did not enable them to manage users.
    This must be a rather common approach, to have some users being able to administer other users without being a fullfledge DBA.
    Right now I'm looking into mapping them(the local administrators) to a different database schema with rights to manage users.
    I realize that to map them to another schema, then the checkbox "Use this schema for Portal Users" have to be checked when creating the
    schema. How do I check if this was checked and if it wasn't checked can I alter it now?
    Another thought is to dynamically upon meeting certain conditions making them Full Administrators, then after finishing the task
    reinstating them as normal users.. but this.. well hmm
    Thanks.
    /

Maybe you are looking for