Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

SetUserObjectSecurity returns ERROR_NOT_ENOUGH_QUOTA


View products that this article applies to.

Symptoms

SetUserObjectSecurity returns:
ERROR_NOT_ENOUGH_QUOTA

↑ Back to the top


Cause

All Microsoft Windows NT, Windows 2000, Windows XP Executive objects, which Window stations and Desktops belong to, have a 2K limit on Access Control Lists (ACL). SetUserObjectSecurity returns ERROR_NOT_ENOUGH_QUOTA when this limit is reached. This 2K limit equals approximately 84 or 85 Access Control Entries (ACE).

↑ Back to the top


Resolution

It is recommended that you add an ACE based on the Logon Security Identifier (SID) since this duplicates the process used by the system. For more information about how to do this, click the following article number to view the article in the Microsoft Knowledge Base:
165194 CreateProcessAsUser() windowstations and desktops
Consider the following options when you experience this problem:
  • If you are launching many processes running in the same security context or logon session, you might want to add one ACE versus an ACE for every process.
  • If you can keep track of when the process dies, you should remove the ACE when the process has terminated.
  • If you cannot track when the process dies, there are several procedures that you can use to remove any unnecessary ACEs. You can enumerate processes, read the Logon Security Identifier (SID) or User SID from the process token, and compare one of them to the ACEs stored in the DACL for the window station and desktop objects. This depends on which ACE you used to secure the object. Remove any ACEs for processes that are no longer running on the system. NOTE: there might be other processes that are adding ACEs to the objects.
  • If you are launching many processes, you might want to add an ACE based on the processes logon type. For example, this could be either the Interactive or Batch SID. You would not have to add any additional ACEs for processes with the same logon type.

↑ Back to the top


Status

This behavior is by design.

↑ Back to the top


Applies to:

↑ Back to the top

Keywords: kbsecurity, kbapi, kbfaq, kbkernbase, kbprb, KB185292

↑ Back to the top

Article Info
Article ID : 185292
Revision : 8
Created on : 11/21/2006
Published on : 11/21/2006
Exists online : False
Views : 999