FileSecurity FileSecurity FileSecurity FileSecurity Class

Definición

Representa el control de acceso y la seguridad de auditoría de un archivo.Represents the access control and audit security for a file. Esta clase no puede heredarse.This class cannot be inherited.

public ref class FileSecurity sealed : System::Security::AccessControl::FileSystemSecurity
[System.Security.SecurityCritical]
public sealed class FileSecurity : System.Security.AccessControl.FileSystemSecurity
type FileSecurity = class
    inherit FileSystemSecurity
Public NotInheritable Class FileSecurity
Inherits FileSystemSecurity
Herencia
Atributos

Ejemplos

El siguiente ejemplo de código utiliza el FileSecurity clase para agregar y, a continuación, quitar una entrada de lista (ACL) del control de acceso de un archivo.The following code example uses the FileSecurity class to add and then remove an access control list (ACL) entry from a file. Para ejecutar este ejemplo, debe proporcionar una cuenta de usuario o grupo válida.You must supply a valid user or group account to run this example.

using namespace System;
using namespace System::IO;
using namespace System::Security::AccessControl;

// Adds an ACL entry on the specified file for the specified account.

void AddFileSecurity(String^ fileName, String^ account, 
                        FileSystemRights rights, AccessControlType controlType)
{
    // Get a FileSecurity object that represents the 
    // current security settings.
    FileSecurity^ fSecurity = File::GetAccessControl(fileName);

    // Add the FileSystemAccessRule to the security settings. 
    fSecurity->AddAccessRule(gcnew FileSystemAccessRule
                                   (account,rights, controlType));

    // Set the new access settings.
    File::SetAccessControl(fileName, fSecurity);
}

// Removes an ACL entry on the specified file for the specified account.

void RemoveFileSecurity(String^ fileName, String^ account, 
                        FileSystemRights rights, AccessControlType controlType)
{

    // Get a FileSecurity object that represents the 
    // current security settings.
    FileSecurity^ fSecurity = File::GetAccessControl(fileName);

    // Remove the FileSystemAccessRule from the security settings. 
    fSecurity->RemoveAccessRule(gcnew FileSystemAccessRule
                                      (account,rights, controlType));

    // Set the new access settings.
    File::SetAccessControl(fileName, fSecurity);
}

int main()
{
    try
    {
        String^ fileName = "test.xml";

        Console::WriteLine("Adding access control entry for " + fileName);

        // Add the access control entry to the file.
        AddFileSecurity(fileName, "MYDOMAIN\\MyAccount", 
            FileSystemRights::ReadData, AccessControlType::Allow);

        Console::WriteLine("Removing access control entry from " + fileName);

        // Remove the access control entry from the file.
        RemoveFileSecurity(fileName, "MYDOMAIN\\MyAccount", 
            FileSystemRights::ReadData, AccessControlType::Allow);

        Console::WriteLine("Done.");
    }
    catch (Exception^ ex)
    {
        Console::WriteLine(ex->Message);
    }
}

using System;
using System.IO;
using System.Security.AccessControl;

namespace FileSystemExample
{
    class FileExample
    {
        public static void Main()
        {
            try
            {
                string fileName = "test.xml";

                Console.WriteLine("Adding access control entry for "
                    + fileName);

                // Add the access control entry to the file.
                AddFileSecurity(fileName, @"DomainName\AccountName",
                    FileSystemRights.ReadData, AccessControlType.Allow);

                Console.WriteLine("Removing access control entry from "
                    + fileName);

                // Remove the access control entry from the file.
                RemoveFileSecurity(fileName, @"DomainName\AccountName",
                    FileSystemRights.ReadData, AccessControlType.Allow);

                Console.WriteLine("Done.");
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }

        // Adds an ACL entry on the specified file for the specified account.
        public static void AddFileSecurity(string fileName, string account,
            FileSystemRights rights, AccessControlType controlType)
        {


            // Get a FileSecurity object that represents the
            // current security settings.
            FileSecurity fSecurity = File.GetAccessControl(fileName);

            // Add the FileSystemAccessRule to the security settings.
            fSecurity.AddAccessRule(new FileSystemAccessRule(account,
                rights, controlType));

            // Set the new access settings.
            File.SetAccessControl(fileName, fSecurity);

        }

        // Removes an ACL entry on the specified file for the specified account.
        public static void RemoveFileSecurity(string fileName, string account,
            FileSystemRights rights, AccessControlType controlType)
        {

            // Get a FileSecurity object that represents the
            // current security settings.
            FileSecurity fSecurity = File.GetAccessControl(fileName);

            // Remove the FileSystemAccessRule from the security settings.
            fSecurity.RemoveAccessRule(new FileSystemAccessRule(account,
                rights, controlType));

            // Set the new access settings.
            File.SetAccessControl(fileName, fSecurity);

        }
    }
}
Imports System
Imports System.IO
Imports System.Security.AccessControl



Module FileExample

    Sub Main()
        Try
            Dim fileName As String = "test.xml"

            Console.WriteLine("Adding access control entry for " & fileName)

            ' Add the access control entry to the file.
            AddFileSecurity(fileName, "DomainName\AccountName", _
                FileSystemRights.ReadData, AccessControlType.Allow)

            Console.WriteLine("Removing access control entry from " & fileName)

            ' Remove the access control entry from the file.
            RemoveFileSecurity(fileName, "DomainName\AccountName", _
                FileSystemRights.ReadData, AccessControlType.Allow)

            Console.WriteLine("Done.")
        Catch e As Exception
            Console.WriteLine(e)
        End Try

    End Sub


    ' Adds an ACL entry on the specified file for the specified account.
    Sub AddFileSecurity(ByVal fileName As String, ByVal account As String, _
        ByVal rights As FileSystemRights, ByVal controlType As AccessControlType)
  
        ' Get a FileSecurity object that represents the 
        ' current security settings.
        Dim fSecurity As FileSecurity = File.GetAccessControl(fileName)

        ' Add the FileSystemAccessRule to the security settings. 
        Dim accessRule As FileSystemAccessRule = _
            New FileSystemAccessRule(account, rights, controlType)

        fSecurity.AddAccessRule(accessRule)

        ' Set the new access settings.
        File.SetAccessControl(fileName, fSecurity)

    End Sub


    ' Removes an ACL entry on the specified file for the specified account.
    Sub RemoveFileSecurity(ByVal fileName As String, ByVal account As String, _
        ByVal rights As FileSystemRights, ByVal controlType As AccessControlType)

        ' Get a FileSecurity object that represents the 
        ' current security settings.
        Dim fSecurity As FileSecurity = File.GetAccessControl(fileName)

        ' Remove the FileSystemAccessRule from the security settings. 
        fSecurity.RemoveAccessRule(New FileSystemAccessRule(account, _
            rights, controlType))

        ' Set the new access settings.
        File.SetAccessControl(fileName, fSecurity)

    End Sub
End Module

Comentarios

La FileSecurity clase especifica los derechos de acceso para un archivo del sistema y cómo auditar los intentos de acceso.The FileSecurity class specifies the access rights for a system file and how access attempts are audited. Esta clase representa los derechos de acceso y auditoría como un conjunto de reglas.This class represents access and audit rights as a set of rules. Cada regla de acceso se representa mediante un FileSystemAccessRule objeto, mientras que cada regla de auditoría se representa mediante un FileSystemAuditRule objeto.Each access rule is represented by a FileSystemAccessRule object, while each audit rule is represented by a FileSystemAuditRule object.

La FileSecurity clase es una abstracción del sistema de seguridad de archivos de Microsoft Windows subyacente.The FileSecurity class is an abstraction of the underlying Microsoft Windows file security system. En este sistema, cada archivo tiene una lista de control de acceso discrecional (DACL), que controla el acceso al archivo y una lista de control de acceso del sistema (SACL), que especifica los intentos de control de acceso se auditan.In this system, each file has a discretionary access control list (DACL), which controls access to the file, and a system access control list (SACL), which specifies the access control attempts that are audited. El FileSystemAccessRule y FileSystemAuditRule clases son abstracciones de las entradas de control de acceso (ACE) que comprenden las DACL y las SACL.The FileSystemAccessRule and FileSystemAuditRule classes are abstractions of the access control entries (ACEs) that comprise DACLs and SACLs.

La FileSecurity clase oculta muchos de los detalles de las DACL y las SACL; que no tiene que preocuparse sobre pedidos de ACE o DACL null.The FileSecurity class hides many of the details of DACLs and SACLs; you do not have to worry about ACE ordering or null DACLS.

Use la FileSecurity clase para recuperar, agregar o cambiar las reglas de acceso que representan la DACL y SACL de un archivo.Use the FileSecurity class to retrieve, add, or change the access rules that represent the DACL and SACL of a file.

Para conservar el acceso nuevo o modificado o las reglas a un archivo de auditoría, utilice el SetAccessControl método.To persist new or changed access or audit rules to a file, use the SetAccessControl method. Para recuperar las reglas de acceso o de auditoría de un archivo existente, utilice el método GetAccessControl.To retrieve access or audit rules from an existing file, use the GetAccessControl method.

Constructores

FileSecurity() FileSecurity() FileSecurity() FileSecurity()

Inicializa una nueva instancia de la clase FileSecurity.Initializes a new instance of the FileSecurity class.

FileSecurity(String, AccessControlSections) FileSecurity(String, AccessControlSections) FileSecurity(String, AccessControlSections) FileSecurity(String, AccessControlSections)

Inicializa una nueva instancia de la clase FileSecurity a partir de un archivo especificado utilizando los valores especificados de la enumeración AccessControlSections.Initializes a new instance of the FileSecurity class from a specified file using the specified values of the AccessControlSections enumeration.

Métodos

AccessRuleFactory(IdentityReference, Int32, Boolean, InheritanceFlags, PropagationFlags, AccessControlType) AccessRuleFactory(IdentityReference, Int32, Boolean, InheritanceFlags, PropagationFlags, AccessControlType) AccessRuleFactory(IdentityReference, Int32, Boolean, InheritanceFlags, PropagationFlags, AccessControlType) AccessRuleFactory(IdentityReference, Int32, Boolean, InheritanceFlags, PropagationFlags, AccessControlType)

Inicializa una nueva instancia de la clase FileSystemAccessRule que representa una nueva regla de control de acceso para el usuario indicado con los derechos de acceso, el control de acceso y los marcadores especificados.Initializes a new instance of the FileSystemAccessRule class that represents a new access control rule for the specified user, with the specified access rights, access control, and flags.

(Inherited from FileSystemSecurity)
AddAccessRule(AccessRule) AddAccessRule(AccessRule) AddAccessRule(AccessRule) AddAccessRule(AccessRule)

Agrega la regla de acceso especificada a la lista de control de acceso discrecional (DACL) asociada al objeto CommonObjectSecurity.Adds the specified access rule to the Discretionary Access Control List (DACL) associated with this CommonObjectSecurity object.

(Inherited from CommonObjectSecurity)
AddAccessRule(FileSystemAccessRule) AddAccessRule(FileSystemAccessRule) AddAccessRule(FileSystemAccessRule) AddAccessRule(FileSystemAccessRule)

Agrega el permiso de la lista de control de acceso (ACL) especificado al archivo o directorio actual.Adds the specified access control list (ACL) permission to the current file or directory.

(Inherited from FileSystemSecurity)
AddAuditRule(AuditRule) AddAuditRule(AuditRule) AddAuditRule(AuditRule) AddAuditRule(AuditRule)

Agrega la regla de auditoría especificada a la lista de control de acceso de sistema (SACL) asociada al objeto CommonObjectSecurity.Adds the specified audit rule to the System Access Control List (SACL) associated with this CommonObjectSecurity object.

(Inherited from CommonObjectSecurity)
AddAuditRule(FileSystemAuditRule) AddAuditRule(FileSystemAuditRule) AddAuditRule(FileSystemAuditRule) AddAuditRule(FileSystemAuditRule)

Agrega la regla de auditoría especificada al archivo o directorio actual.Adds the specified audit rule to the current file or directory.

(Inherited from FileSystemSecurity)
AuditRuleFactory(IdentityReference, Int32, Boolean, InheritanceFlags, PropagationFlags, AuditFlags) AuditRuleFactory(IdentityReference, Int32, Boolean, InheritanceFlags, PropagationFlags, AuditFlags) AuditRuleFactory(IdentityReference, Int32, Boolean, InheritanceFlags, PropagationFlags, AuditFlags) AuditRuleFactory(IdentityReference, Int32, Boolean, InheritanceFlags, PropagationFlags, AuditFlags)

Inicializa una nueva instancia de la clase FileSystemAuditRule que representa la regla de auditoría especificada para el usuario especificado.Initializes a new instance of the FileSystemAuditRule class representing the specified audit rule for the specified user.

(Inherited from FileSystemSecurity)
Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determina si el objeto especificado es igual al objeto actual.Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetAccessRules(Boolean, Boolean, Type) GetAccessRules(Boolean, Boolean, Type) GetAccessRules(Boolean, Boolean, Type) GetAccessRules(Boolean, Boolean, Type)

Obtiene una colección de las reglas de acceso asociadas al identificador de seguridad especificado.Gets a collection of the access rules associated with the specified security identifier.

(Inherited from CommonObjectSecurity)
GetAuditRules(Boolean, Boolean, Type) GetAuditRules(Boolean, Boolean, Type) GetAuditRules(Boolean, Boolean, Type) GetAuditRules(Boolean, Boolean, Type)

Obtiene una colección de las reglas de auditoría asociadas al identificador de seguridad especificado.Gets a collection of the audit rules associated with the specified security identifier.

(Inherited from CommonObjectSecurity)
GetGroup(Type) GetGroup(Type) GetGroup(Type) GetGroup(Type)

Obtiene el grupo primario asociado al propietario especificado.Gets the primary group associated with the specified owner.

(Inherited from ObjectSecurity)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Sirve como la función hash predeterminada.Serves as the default hash function.

(Inherited from Object)
GetOwner(Type) GetOwner(Type) GetOwner(Type) GetOwner(Type)

Obtiene el propietario asociado al grupo primario especificado.Gets the owner associated with the specified primary group.

(Inherited from ObjectSecurity)
GetSecurityDescriptorBinaryForm() GetSecurityDescriptorBinaryForm() GetSecurityDescriptorBinaryForm() GetSecurityDescriptorBinaryForm()

Devuelve una matriz de valores de byte que representa la información del descriptor de seguridad para este objeto ObjectSecurity.Returns an array of byte values that represents the security descriptor information for this ObjectSecurity object.

(Inherited from ObjectSecurity)
GetSecurityDescriptorSddlForm(AccessControlSections) GetSecurityDescriptorSddlForm(AccessControlSections) GetSecurityDescriptorSddlForm(AccessControlSections) GetSecurityDescriptorSddlForm(AccessControlSections)

Devuelve la representación del Lenguaje de definición de descriptores de seguridad (SDDL) de las secciones especificadas del descriptor de seguridad asociado a este objeto ObjectSecurity.Returns the Security Descriptor Definition Language (SDDL) representation of the specified sections of the security descriptor associated with this ObjectSecurity object.

(Inherited from ObjectSecurity)
GetType() GetType() GetType() GetType()

Obtiene el Type de la instancia actual.Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Crea una copia superficial del objeto Object actual.Creates a shallow copy of the current Object.

(Inherited from Object)
ModifyAccess(AccessControlModification, AccessRule, Boolean) ModifyAccess(AccessControlModification, AccessRule, Boolean) ModifyAccess(AccessControlModification, AccessRule, Boolean) ModifyAccess(AccessControlModification, AccessRule, Boolean)

Aplica la modificación especificada a la lista de control de acceso discrecional (DACL) (DACL) asociada a este objeto CommonObjectSecurity.Applies the specified modification to the Discretionary Access Control List (DACL) associated with this CommonObjectSecurity object.

(Inherited from CommonObjectSecurity)
ModifyAccessRule(AccessControlModification, AccessRule, Boolean) ModifyAccessRule(AccessControlModification, AccessRule, Boolean) ModifyAccessRule(AccessControlModification, AccessRule, Boolean) ModifyAccessRule(AccessControlModification, AccessRule, Boolean)

Aplica la modificación especificada a la lista de control de acceso discrecional (DACL) (DACL) asociada a este objeto ObjectSecurity.Applies the specified modification to the Discretionary Access Control List (DACL) associated with this ObjectSecurity object.

(Inherited from ObjectSecurity)
ModifyAudit(AccessControlModification, AuditRule, Boolean) ModifyAudit(AccessControlModification, AuditRule, Boolean) ModifyAudit(AccessControlModification, AuditRule, Boolean) ModifyAudit(AccessControlModification, AuditRule, Boolean)

Aplica la modificación especificada a la lista de control de acceso del sistema (SACL) asociada a este objeto CommonObjectSecurity.Applies the specified modification to the System Access Control List (SACL) associated with this CommonObjectSecurity object.

(Inherited from CommonObjectSecurity)
ModifyAuditRule(AccessControlModification, AuditRule, Boolean) ModifyAuditRule(AccessControlModification, AuditRule, Boolean) ModifyAuditRule(AccessControlModification, AuditRule, Boolean) ModifyAuditRule(AccessControlModification, AuditRule, Boolean)

Aplica la modificación especificada a la lista de control de acceso del sistema (SACL) asociada a este objeto ObjectSecurity.Applies the specified modification to the System Access Control List (SACL) associated with this ObjectSecurity object.

(Inherited from ObjectSecurity)
Persist(Boolean, String, AccessControlSections) Persist(Boolean, String, AccessControlSections) Persist(Boolean, String, AccessControlSections) Persist(Boolean, String, AccessControlSections)

Guarda las secciones especificadas del descriptor de seguridad asociado a este objeto ObjectSecurity en el almacenamiento permanente.Saves the specified sections of the security descriptor associated with this ObjectSecurity object to permanent storage. Se recomienda que los valores de los parámetros includeSections pasados al constructor y a los métodos de persistencia sean idénticos.We recommend that the values of the includeSections parameters passed to the constructor and persist methods be identical.

(Inherited from ObjectSecurity)
Persist(SafeHandle, AccessControlSections) Persist(SafeHandle, AccessControlSections) Persist(SafeHandle, AccessControlSections) Persist(SafeHandle, AccessControlSections)

Guarda las secciones especificadas del descriptor de seguridad asociado a este objeto NativeObjectSecurity en el almacenamiento permanente.Saves the specified sections of the security descriptor associated with this NativeObjectSecurity object to permanent storage. Se recomienda que los valores de los parámetros includeSections pasados al constructor y a los métodos de persistencia sean idénticos.We recommend.persist that the values of the includeSections parameters passed to the constructor and persist methods be identical.

(Inherited from NativeObjectSecurity)
Persist(SafeHandle, AccessControlSections, Object) Persist(SafeHandle, AccessControlSections, Object) Persist(SafeHandle, AccessControlSections, Object) Persist(SafeHandle, AccessControlSections, Object)

Guarda las secciones especificadas del descriptor de seguridad asociado a este objeto NativeObjectSecurity en el almacenamiento permanente.Saves the specified sections of the security descriptor associated with this NativeObjectSecurity object to permanent storage. Se recomienda que los valores de los parámetros includeSections pasados al constructor y a los métodos de persistencia sean idénticos.We recommend that the values of the includeSections parameters passed to the constructor and persist methods be identical.

(Inherited from NativeObjectSecurity)
Persist(String, AccessControlSections) Persist(String, AccessControlSections) Persist(String, AccessControlSections) Persist(String, AccessControlSections)

Guarda las secciones especificadas del descriptor de seguridad asociado a este objeto NativeObjectSecurity en el almacenamiento permanente.Saves the specified sections of the security descriptor associated with this NativeObjectSecurity object to permanent storage. Se recomienda que los valores de los parámetros includeSections pasados al constructor y a los métodos de persistencia sean idénticos.We recommend that the values of the includeSections parameters passed to the constructor and persist methods be identical.

(Inherited from NativeObjectSecurity)
Persist(String, AccessControlSections, Object) Persist(String, AccessControlSections, Object) Persist(String, AccessControlSections, Object) Persist(String, AccessControlSections, Object)

Guarda las secciones especificadas del descriptor de seguridad asociado a este objeto NativeObjectSecurity en el almacenamiento permanente.Saves the specified sections of the security descriptor associated with this NativeObjectSecurity object to permanent storage. Se recomienda que los valores de los parámetros includeSections pasados al constructor y a los métodos de persistencia sean idénticos.We recommend that the values of the includeSections parameters passed to the constructor and persist methods be identical.

(Inherited from NativeObjectSecurity)
PurgeAccessRules(IdentityReference) PurgeAccessRules(IdentityReference) PurgeAccessRules(IdentityReference) PurgeAccessRules(IdentityReference)

Quita todas las reglas de acceso asociadas al objeto IdentityReference especificado.Removes all access rules associated with the specified IdentityReference.

(Inherited from ObjectSecurity)
PurgeAuditRules(IdentityReference) PurgeAuditRules(IdentityReference) PurgeAuditRules(IdentityReference) PurgeAuditRules(IdentityReference)

Quita todas las reglas de auditoría asociadas con el IdentityReference especificado.Removes all audit rules associated with the specified IdentityReference.

(Inherited from ObjectSecurity)
ReadLock() ReadLock() ReadLock() ReadLock()

Bloquea este objeto ObjectSecurity para acceso de lectura.Locks this ObjectSecurity object for read access.

(Inherited from ObjectSecurity)
ReadUnlock() ReadUnlock() ReadUnlock() ReadUnlock()

Desbloquea este objeto ObjectSecurity para acceso de lectura.Unlocks this ObjectSecurity object for read access.

(Inherited from ObjectSecurity)
RemoveAccessRule(AccessRule) RemoveAccessRule(AccessRule) RemoveAccessRule(AccessRule) RemoveAccessRule(AccessRule)

Quita las reglas de acceso que contienen el mismo identificador de seguridad y máscara de acceso que la regla de acceso especificada de la lista de control de acceso discrecional (DACL) asociada al objeto CommonObjectSecurity.Removes access rules that contain the same security identifier and access mask as the specified access rule from the Discretionary Access Control List (DACL) associated with this CommonObjectSecurity object.

(Inherited from CommonObjectSecurity)
RemoveAccessRule(FileSystemAccessRule) RemoveAccessRule(FileSystemAccessRule) RemoveAccessRule(FileSystemAccessRule) RemoveAccessRule(FileSystemAccessRule)

Quita todos permisos de la lista de control de acceso (ACL) Allow o Deny coincidentes del archivo o directorio actual.Removes all matching allow or deny access control list (ACL) permissions from the current file or directory.

(Inherited from FileSystemSecurity)
RemoveAccessRuleAll(AccessRule) RemoveAccessRuleAll(AccessRule) RemoveAccessRuleAll(AccessRule) RemoveAccessRuleAll(AccessRule)

Quita todas las reglas de acceso que tienen el mismo identificador de seguridad que la regla de acceso especificada de la lista de control de acceso discrecional (DACL) asociada al objeto CommonObjectSecurity.Removes all access rules that have the same security identifier as the specified access rule from the Discretionary Access Control List (DACL) associated with this CommonObjectSecurity object.

(Inherited from CommonObjectSecurity)
RemoveAccessRuleAll(FileSystemAccessRule) RemoveAccessRuleAll(FileSystemAccessRule) RemoveAccessRuleAll(FileSystemAccessRule) RemoveAccessRuleAll(FileSystemAccessRule)

Quita todos los permisos de la lista de control de acceso (ACL) para el usuario especificado del archivo o directorio actual.Removes all access control list (ACL) permissions for the specified user from the current file or directory.

(Inherited from FileSystemSecurity)
RemoveAccessRuleSpecific(AccessRule) RemoveAccessRuleSpecific(AccessRule) RemoveAccessRuleSpecific(AccessRule) RemoveAccessRuleSpecific(AccessRule)

Quita todas las reglas de acceso que coinciden exactamente con la regla de acceso especificada de la lista de control de acceso discrecional (DACL) asociada al objeto CommonObjectSecurity.Removes all access rules that exactly match the specified access rule from the Discretionary Access Control List (DACL) associated with this CommonObjectSecurity object.

(Inherited from CommonObjectSecurity)
RemoveAccessRuleSpecific(FileSystemAccessRule) RemoveAccessRuleSpecific(FileSystemAccessRule) RemoveAccessRuleSpecific(FileSystemAccessRule) RemoveAccessRuleSpecific(FileSystemAccessRule)

Quita un solo permiso de la lista de control de acceso (ACL) Allow o Deny coincidente del archivo o directorio actual.Removes a single matching allow or deny access control list (ACL) permission from the current file or directory.

(Inherited from FileSystemSecurity)
RemoveAuditRule(AuditRule) RemoveAuditRule(AuditRule) RemoveAuditRule(AuditRule) RemoveAuditRule(AuditRule)

Quita las reglas de auditoría que contienen el mismo identificador de seguridad y máscara de acceso que la regla de auditoría especificada de la lista de control de acceso de sistema (SACL) asociada al objeto CommonObjectSecurity.Removes audit rules that contain the same security identifier and access mask as the specified audit rule from the System Access Control List (SACL) associated with this CommonObjectSecurity object.

(Inherited from CommonObjectSecurity)
RemoveAuditRule(FileSystemAuditRule) RemoveAuditRule(FileSystemAuditRule) RemoveAuditRule(FileSystemAuditRule) RemoveAuditRule(FileSystemAuditRule)

Quita todas las reglas de auditoría Allow o Deny coincidentes del archivo o directorio actual.Removes all matching allow or deny audit rules from the current file or directory.

(Inherited from FileSystemSecurity)
RemoveAuditRuleAll(AuditRule) RemoveAuditRuleAll(AuditRule) RemoveAuditRuleAll(AuditRule) RemoveAuditRuleAll(AuditRule)

Quita todas las reglas de auditoría que tienen el mismo identificador de seguridad que la regla de auditoría especificada de la lista de control de acceso de sistema (SACL) asociada al objeto CommonObjectSecurity.Removes all audit rules that have the same security identifier as the specified audit rule from the System Access Control List (SACL) associated with this CommonObjectSecurity object.

(Inherited from CommonObjectSecurity)
RemoveAuditRuleAll(FileSystemAuditRule) RemoveAuditRuleAll(FileSystemAuditRule) RemoveAuditRuleAll(FileSystemAuditRule) RemoveAuditRuleAll(FileSystemAuditRule)

Quita todas las reglas de auditoría para el usuario especificado del archivo o directorio actual.Removes all audit rules for the specified user from the current file or directory.

(Inherited from FileSystemSecurity)
RemoveAuditRuleSpecific(AuditRule) RemoveAuditRuleSpecific(AuditRule) RemoveAuditRuleSpecific(AuditRule) RemoveAuditRuleSpecific(AuditRule)

Quita todas las reglas de auditoría que coinciden exactamente con la regla de auditoría especificada de la lista de control de acceso de sistema (SACL) asociada al objeto CommonObjectSecurity.Removes all audit rules that exactly match the specified audit rule from the System Access Control List (SACL) associated with this CommonObjectSecurity object.

(Inherited from CommonObjectSecurity)
RemoveAuditRuleSpecific(FileSystemAuditRule) RemoveAuditRuleSpecific(FileSystemAuditRule) RemoveAuditRuleSpecific(FileSystemAuditRule) RemoveAuditRuleSpecific(FileSystemAuditRule)

Quita una regla de auditoría Allow o Deny coincidente del archivo o directorio actual.Removes a single matching allow or deny audit rule from the current file or directory.

(Inherited from FileSystemSecurity)
ResetAccessRule(AccessRule) ResetAccessRule(AccessRule) ResetAccessRule(AccessRule) ResetAccessRule(AccessRule)

Quita todas las reglas de acceso de la lista de control de acceso discrecional (DACL) asociada al objeto CommonObjectSecurity y, a continuación, agrega la regla de acceso especificada.Removes all access rules in the Discretionary Access Control List (DACL) associated with this CommonObjectSecurity object and then adds the specified access rule.

(Inherited from CommonObjectSecurity)
ResetAccessRule(FileSystemAccessRule) ResetAccessRule(FileSystemAccessRule) ResetAccessRule(FileSystemAccessRule) ResetAccessRule(FileSystemAccessRule)

Agrega el permiso de la lista de control de acceso (ACL) especificado al archivo o directorio actual y quita todos los permisos de ACL coincidentes.Adds the specified access control list (ACL) permission to the current file or directory and removes all matching ACL permissions.

(Inherited from FileSystemSecurity)
SetAccessRule(AccessRule) SetAccessRule(AccessRule) SetAccessRule(AccessRule) SetAccessRule(AccessRule)

Quita todas las reglas de acceso que contienen el mismo identificador de seguridad y calificador que la regla de acceso especificada en la lista de control de acceso discrecional (DACL) asociada al objeto CommonObjectSecurity y, a continuación, agrega la regla de acceso especificada.Removes all access rules that contain the same security identifier and qualifier as the specified access rule in the Discretionary Access Control List (DACL) associated with this CommonObjectSecurity object and then adds the specified access rule.

(Inherited from CommonObjectSecurity)
SetAccessRule(FileSystemAccessRule) SetAccessRule(FileSystemAccessRule) SetAccessRule(FileSystemAccessRule) SetAccessRule(FileSystemAccessRule)

Establece el permiso de la lista de control de acceso (ACL) especificado para el archivo o directorio actual.Sets the specified access control list (ACL) permission for the current file or directory.

(Inherited from FileSystemSecurity)
SetAccessRuleProtection(Boolean, Boolean) SetAccessRuleProtection(Boolean, Boolean) SetAccessRuleProtection(Boolean, Boolean) SetAccessRuleProtection(Boolean, Boolean)

Establece o quita la protección de las reglas de acceso asociadas a este objeto ObjectSecurity.Sets or removes protection of the access rules associated with this ObjectSecurity object. Los objetos primarios no pueden modificar las reglas de acceso protegido a través de la herencia.Protected access rules cannot be modified by parent objects through inheritance.

(Inherited from ObjectSecurity)
SetAuditRule(AuditRule) SetAuditRule(AuditRule) SetAuditRule(AuditRule) SetAuditRule(AuditRule)

Quita todas las reglas de auditoría que contienen el mismo identificador de seguridad y calificador que la regla de auditoría especificada en la lista de control de acceso de sistema (SACL) asociada al objeto CommonObjectSecurity y, a continuación, agrega la regla de auditoría especificada.Removes all audit rules that contain the same security identifier and qualifier as the specified audit rule in the System Access Control List (SACL) associated with this CommonObjectSecurity object and then adds the specified audit rule.

(Inherited from CommonObjectSecurity)
SetAuditRule(FileSystemAuditRule) SetAuditRule(FileSystemAuditRule) SetAuditRule(FileSystemAuditRule) SetAuditRule(FileSystemAuditRule)

Establece la regla de auditoría especificada para el archivo o directorio actual.Sets the specified audit rule for the current file or directory.

(Inherited from FileSystemSecurity)
SetAuditRuleProtection(Boolean, Boolean) SetAuditRuleProtection(Boolean, Boolean) SetAuditRuleProtection(Boolean, Boolean) SetAuditRuleProtection(Boolean, Boolean)

Establece o quita la protección de las reglas de auditoría asociadas a este objeto ObjectSecurity.Sets or removes protection of the audit rules associated with this ObjectSecurity object. Los objetos primarios no pueden modificar las reglas de auditoría protegidas a través de la herencia.Protected audit rules cannot be modified by parent objects through inheritance.

(Inherited from ObjectSecurity)
SetGroup(IdentityReference) SetGroup(IdentityReference) SetGroup(IdentityReference) SetGroup(IdentityReference)

Establece el grupo primario del descriptor de seguridad asociado a este objeto ObjectSecurity.Sets the primary group for the security descriptor associated with this ObjectSecurity object.

(Inherited from ObjectSecurity)
SetOwner(IdentityReference) SetOwner(IdentityReference) SetOwner(IdentityReference) SetOwner(IdentityReference)

Establece el propietario del descriptor de seguridad asociado a este objeto ObjectSecurity.Sets the owner for the security descriptor associated with this ObjectSecurity object.

(Inherited from ObjectSecurity)
SetSecurityDescriptorBinaryForm(Byte[]) SetSecurityDescriptorBinaryForm(Byte[]) SetSecurityDescriptorBinaryForm(Byte[]) SetSecurityDescriptorBinaryForm(Byte[])

Establece el descriptor de seguridad para este objeto ObjectSecurity de la matriz especificada de valores de bytes.Sets the security descriptor for this ObjectSecurity object from the specified array of byte values.

(Inherited from ObjectSecurity)
SetSecurityDescriptorBinaryForm(Byte[], AccessControlSections) SetSecurityDescriptorBinaryForm(Byte[], AccessControlSections) SetSecurityDescriptorBinaryForm(Byte[], AccessControlSections) SetSecurityDescriptorBinaryForm(Byte[], AccessControlSections)

Establece las secciones especificadas del descriptor de seguridad para este objeto ObjectSecurity de la matriz especificada de valores de bytes.Sets the specified sections of the security descriptor for this ObjectSecurity object from the specified array of byte values.

(Inherited from ObjectSecurity)
SetSecurityDescriptorSddlForm(String) SetSecurityDescriptorSddlForm(String) SetSecurityDescriptorSddlForm(String) SetSecurityDescriptorSddlForm(String)

Establece el descriptor de seguridad para este objeto ObjectSecurity de la cadena de Lenguaje de definición de descriptores de seguridad (SDDL) especificada.Sets the security descriptor for this ObjectSecurity object from the specified Security Descriptor Definition Language (SDDL) string.

(Inherited from ObjectSecurity)
SetSecurityDescriptorSddlForm(String, AccessControlSections) SetSecurityDescriptorSddlForm(String, AccessControlSections) SetSecurityDescriptorSddlForm(String, AccessControlSections) SetSecurityDescriptorSddlForm(String, AccessControlSections)

Establece las secciones especificadas del descriptor de seguridad para este objeto ObjectSecurity de la cadena de Lenguaje de definición de descriptores de seguridad (SDDL) especificada.Sets the specified sections of the security descriptor for this ObjectSecurity object from the specified Security Descriptor Definition Language (SDDL) string.

(Inherited from ObjectSecurity)
ToString() ToString() ToString() ToString()

Devuelve una cadena que representa el objeto actual.Returns a string that represents the current object.

(Inherited from Object)
WriteLock() WriteLock() WriteLock() WriteLock()

Bloquea este objeto ObjectSecurity para el acceso de escritura.Locks this ObjectSecurity object for write access.

(Inherited from ObjectSecurity)
WriteUnlock() WriteUnlock() WriteUnlock() WriteUnlock()

Desbloquea este objeto ObjectSecurity para el acceso de escritura.Unlocks this ObjectSecurity object for write access.

(Inherited from ObjectSecurity)

Propiedades

AccessRightType AccessRightType AccessRightType AccessRightType

Obtiene la enumeración que la clase FileSystemSecurity utiliza para representar los derechos de acceso.Gets the enumeration that the FileSystemSecurity class uses to represent access rights.

(Inherited from FileSystemSecurity)
AccessRulesModified AccessRulesModified AccessRulesModified AccessRulesModified

Obtiene o establece un valor booleano que especifica si se han modificado las reglas de acceso asociadas a este objeto ObjectSecurity.Gets or sets a Boolean value that specifies whether the access rules associated with this ObjectSecurity object have been modified.

(Inherited from ObjectSecurity)
AccessRuleType AccessRuleType AccessRuleType AccessRuleType

Obtiene la enumeración que la clase FileSystemSecurity utiliza para representar las reglas de acceso.Gets the enumeration that the FileSystemSecurity class uses to represent access rules.

(Inherited from FileSystemSecurity)
AreAccessRulesCanonical AreAccessRulesCanonical AreAccessRulesCanonical AreAccessRulesCanonical

Obtiene un valor booleano que especifica si las reglas de acceso asociadas con este objeto ObjectSecurity están en orden canónico.Gets a Boolean value that specifies whether the access rules associated with this ObjectSecurity object are in canonical order.

(Inherited from ObjectSecurity)
AreAccessRulesProtected AreAccessRulesProtected AreAccessRulesProtected AreAccessRulesProtected

Obtiene un valor booleano que especifica si la lista de control de acceso discrecional (DACL) asociada a este objeto ObjectSecurity está protegida.Gets a Boolean value that specifies whether the Discretionary Access Control List (DACL) associated with this ObjectSecurity object is protected.

(Inherited from ObjectSecurity)
AreAuditRulesCanonical AreAuditRulesCanonical AreAuditRulesCanonical AreAuditRulesCanonical

Obtiene un valor booleano que especifica si las reglas de auditoría asociadas a este objeto ObjectSecurity están en orden canónico.Gets a Boolean value that specifies whether the audit rules associated with this ObjectSecurity object are in canonical order.

(Inherited from ObjectSecurity)
AreAuditRulesProtected AreAuditRulesProtected AreAuditRulesProtected AreAuditRulesProtected

Obtiene un valor booleano que especifica si la lista de control de acceso del sistema (SACL) asociada a este objeto ObjectSecurity está protegida.Gets a Boolean value that specifies whether the System Access Control List (SACL) associated with this ObjectSecurity object is protected.

(Inherited from ObjectSecurity)
AuditRulesModified AuditRulesModified AuditRulesModified AuditRulesModified

Obtiene un valor booleano que especifica si las reglas de auditoría asociadas a este objeto ObjectSecurity se han modificado.Gets or sets a Boolean value that specifies whether the audit rules associated with this ObjectSecurity object have been modified.

(Inherited from ObjectSecurity)
AuditRuleType AuditRuleType AuditRuleType AuditRuleType

Obtiene el tipo que utiliza la clase FileSystemSecurity para representar las reglas de auditoría.Gets the type that the FileSystemSecurity class uses to represent audit rules.

(Inherited from FileSystemSecurity)
GroupModified GroupModified GroupModified GroupModified

Obtiene o establece un valor booleano que especifica si se ha modificado el grupo asociado al objeto protegible.Gets or sets a Boolean value that specifies whether the group associated with the securable object has been modified.

(Inherited from ObjectSecurity)
IsContainer IsContainer IsContainer IsContainer

Obtiene un valor booleano que especifica si este objeto ObjectSecurity es un objeto de contenedor.Gets a Boolean value that specifies whether this ObjectSecurity object is a container object.

(Inherited from ObjectSecurity)
IsDS IsDS IsDS IsDS

Obtiene un valor booleano que especifica si este objeto ObjectSecurity es un objeto de directorio.Gets a Boolean value that specifies whether this ObjectSecurity object is a directory object.

(Inherited from ObjectSecurity)
OwnerModified OwnerModified OwnerModified OwnerModified

Obtiene o establece un valor booleano que especifica si se ha modificado el propietario del objeto que se puede proteger.Gets or sets a Boolean value that specifies whether the owner of the securable object has been modified.

(Inherited from ObjectSecurity)
SecurityDescriptor SecurityDescriptor SecurityDescriptor SecurityDescriptor

Obtiene el descriptor de seguridad de esta instancia.Gets the security descriptor for this instance.

(Inherited from ObjectSecurity)

Se aplica a