Tutorial 3.10: Discretionary Access Control (DAC)

Table of Contents

Learning Objectives

After completing this tutorial, you should be able to:

Overview

In Tutorial 3.9, we introduced the four major access control models. Among them, Discretionary Access Control (DAC) is the most common and widely understood. It is the model used by most operating systems, file systems, and applications. DAC is intuitive: the owner of a resource has the discretion to decide who can access it and with what permissions. This flexibility makes DAC appealing for personal computing and many enterprise environments, but it also introduces security risks, particularly the potential for malicious users to trick others into granting access to sensitive resources.

This tutorial provides a comprehensive exploration of DAC. We begin by defining DAC and its foundational principle of owner discretion. We discuss the concept of ownership and how it is established, including the ability to delegate permissions through groups and inheritance. We then examine the two primary mechanisms for implementing DAC: Access Control Lists (ACLs) and capability lists. ACLs are the dominant mechanism, attached to objects and listing subjects with their permissions. Capability lists are attached to subjects and list objects they can access.

We take a deep dive into real-world DAC implementations. We examine the classic UNIX file permission model (owner, group, others, and the read/write/execute bits) and how it has been extended with POSIX ACLs. We then explore the more sophisticated NTFS ACLs used in Windows, which support fine-grained permissions, inheritance, and audit entries.

We also analyze the advantages of DAC—its simplicity, flexibility, and user control—along with its limitations. A major vulnerability is the Trojan horse problem: a user can execute a program that, under the user's own permissions, accesses and modifies files, potentially causing damage. We discuss countermeasures such as the principle of least privilege, user education, and the use of additional security controls (e.g., antivirus, application whitelisting).

The tutorial concludes with case studies illustrating DAC in a small business environment and a university research lab, demonstrating how DAC can be effectively deployed and where its limitations become apparent. By the end of this tutorial, you will have a thorough understanding of DAC, enabling you to design, implement, and manage DAC-based access control systems, as well as recognize when DAC may be insufficient and other models (MAC, RBAC, ABAC) should be considered.

1. Introduction to Discretionary Access Control

1.1 Definition and Core Principle

Discretionary Access Control (DAC) is an access control model in which the owner of a resource (object) has the discretion—the authority—to determine who can access that resource and with what permissions. The owner can grant, revoke, or change permissions at their discretion, subject to any system-wide policies or constraints.

The term "discretionary" emphasizes that the owner has control and can make decisions based on their judgment. This is in contrast to Mandatory Access Control (MAC), where a central authority imposes labels and rules that cannot be overridden by the owner.

1.2 Historical Context

DAC has been a part of computing since the early days of time-sharing systems. The UNIX operating system, developed in the 1970s, introduced a simple DAC model based on the user-owner, group, and others permissions. This model was extended in the 1980s with Access Control Lists (ACLs) in systems like Sun's Network File System (NFS) and later in Windows NT. DAC remains the default access control model in most general-purpose operating systems.

1.3 The Role of Ownership

In DAC, every object (e.g., file, directory, printer) has an owner. The owner is typically the user who created the object, but ownership can be transferred or assigned by a privileged user (e.g., administrator). The owner has the authority to set permissions on the object. This authority includes:

In many systems, the owner is also the only user who can modify the permissions (unless overridden by an administrator). This centralizes control but can lead to inconsistencies if owners are not diligent.

Key Takeaway: DAC gives the owner of a resource the discretion to control access. This flexibility is intuitive and widely used, but it places a significant responsibility on the owner to manage permissions correctly.

2. Ownership and Discretion

2.1 Establishing Ownership

In most systems, the creator of an object becomes its owner. For example, when a user creates a file in UNIX, the user's UID (User ID) is associated with the file as its owner. Similarly, in Windows, the creator gets ownership by default. However, an administrator can take ownership or transfer ownership using special tools.

2.2 Owner's Discretion

The owner can set permissions according to their judgment. The discretion includes:

2.3 Groups and Inheritance

To simplify administration, DAC systems often support groups. Permissions can be granted to a group, and all members of that group inherit those permissions. This is efficient for organizational structures (e.g., a "finance" group needing access to financial files). Inheritance allows permissions to propagate from parent directories to child objects, reducing the need to set permissions on every object individually.

2.4 Ownership Transfer

In some systems, ownership can be transferred to another user. This is typically restricted to administrators or users with the "take ownership" privilege. Transferring ownership is useful when a user leaves an organization or when a resource needs to be managed by another individual.

3. Access Control Lists (ACLs)

3.1 What is an ACL?

An Access Control List (ACL) is a list of entries attached to an object (e.g., a file or directory). Each entry, called an Access Control Entry (ACE), specifies a subject (user or group) and the permissions granted or denied to that subject. ACLs are the primary mechanism for implementing DAC in modern operating systems.

3.2 Structure of an ACL Entry

A typical ACE contains:

3.3 Types of ACLs

3.4 ACL Evaluation

When a subject requests access to an object, the system evaluates the ACL to determine if the subject has the required permissions. The evaluation process typically follows these steps:

  1. If there is a "Deny" entry for the subject or a group they belong to, the access is denied (unless there is an explicit allow with higher precedence, which is uncommon).
  2. Otherwise, if there is an "Allow" entry for the subject or a group, the access is allowed.
  3. If no matching entries exist, access is denied by default (fail-safe).

The order of evaluation depends on the system. In Windows, deny entries take precedence over allow entries. In UNIX ACLs, the order is more nuanced and can be configured.

3.5 Example ACL

Consider a file project.docx with the following ACL in Windows:

In this case, Charlie, even if a member of Finance Group, would be denied read access due to the explicit deny.

Key Takeaway: ACLs are the standard mechanism for DAC, providing fine-grained control over individual objects. They allow owners to specify exactly which subjects have which permissions.

4. Capability Lists

4.1 What is a Capability List?

A capability list is a list attached to a subject that specifies the objects that the subject can access and the permissions allowed on each. This is the inverse of an ACL: rather than each object listing who can access it, each subject lists which objects they can access.

4.2 Capability-Based Security

Capability lists are the foundation of capability-based security, an alternative to ACL-based systems. Capabilities are often implemented as tickets or tokens that the subject presents to the object. The system verifies the capability's authenticity before granting access.

Examples of capability-based systems include the Amoeba distributed operating system, IBM's System/38, and more recently, the Google Fuchsia operating system. Capabilities are also used in some file systems (e.g., network file systems that support delegation).

4.3 Advantages of Capability Lists

4.4 Disadvantages of Capability Lists

4.5 Comparison: ACL vs. Capability Lists

Aspect ACL Capability List
Attached to Object Subject
Scope All subjects for a given object All objects for a given subject
Administration Object owner manages permissions Subject (or authority) manages capabilities
Delegation Requires modifying ACL on object Easier: capability can be passed
Revocation Simple: remove entry from ACL More complex: need to invalidate capability
Common use Mainstream OS (Unix, Windows) Research systems, specialized environments

5. DAC in Practice: UNIX Permissions

5.1 Classic UNIX File Permissions

The classic UNIX file permission model is a form of DAC. Each file and directory has:

Permissions are displayed as a string like -rwxr-x---, which means:

5.2 Limitations of Classic UNIX Permissions

The classic model has limitations:

5.3 POSIX ACLs (Extended ACLs)

To overcome these limitations, POSIX ACLs were introduced. They allow:

POSIX ACLs are widely supported in Linux and other UNIX-like systems. They are managed with commands like setfacl and getfacl.

Example: setfacl -m u:bob:rw file.txt grants Bob read/write access.

5.4 Security Considerations in UNIX DAC

Important: While UNIX permissions are a form of DAC, they are relatively coarse. For more granular control, POSIX ACLs or more advanced models (RBAC, ABAC) are needed.

6. DAC in Practice: Windows NTFS ACLs

6.1 NTFS Security Model

Windows NTFS (New Technology File System) implements a rich DAC model using ACLs. Each file and directory has a security descriptor that includes a DACL and a SACL. The DACL contains ACEs that specify allow or deny permissions for users and groups.

6.2 ACE Structure

An NTFS ACE typically includes:

6.3 Inheritance and Propagation

NTFS ACLs support inheritance, allowing permissions to be inherited from parent directories. Inheritance can be set at the folder level, and files or subfolders can inherit or override these permissions. This simplifies management significantly.

6.4 Effective Permissions

Effective permissions are the actual permissions a user has on an object. They are determined by combining:

The Windows security model also supports "effective permissions" tools that help administrators determine the net permissions for a given user.

6.5 Security Implications

7. Advantages and Limitations of DAC

7.1 Advantages

7.2 Limitations

Caution: The Trojan horse problem is a fundamental weakness of DAC. In environments with high security requirements, DAC should be supplemented with MAC, RBAC, or ABAC, or mitigated through education, application whitelisting, and least privilege.

8. Security Vulnerabilities and Countermeasures

8.1 The Trojan Horse Problem

A Trojan horse is a malicious program that appears to be benign but performs harmful actions. In a DAC system, if a user executes a Trojan horse, the program runs with the user's permissions. It can then read, modify, or delete any files the user has access to, potentially causing significant damage or data theft.

8.2 Other Vulnerabilities

8.3 Countermeasures

9. Case Studies

9.1 Case Study: Small Business File Sharing

Background: A small marketing firm with 20 employees uses a Windows file server to share documents. The file server uses NTFS permissions. Each department has its own shared folder.

Implementation:

Outcome: The DAC model works well because the organization is small and managers are responsible. However, as the company grows, they may need to adopt RBAC to manage complexity.

9.2 Case Study: University Research Lab

Background: A university research lab has multiple research groups working on various projects. The lab uses Linux with POSIX ACLs to manage file permissions on a shared storage system.

Implementation:

Challenges: As the lab grows, managing ACLs manually becomes cumbersome. Additionally, some users may inadvertently share sensitive data with outside collaborators due to overly permissive ACLs. The lab is considering moving to ABAC with attributes (e.g., project membership, clearance) to improve manageability.

10. Summary and Transition

This tutorial provided a comprehensive exploration of Discretionary Access Control (DAC). We defined DAC as a model where the owner of a resource has discretion over access, and we discussed the role of ownership, groups, and delegation. We examined the two primary DAC mechanisms: Access Control Lists (ACLs) and capability lists, comparing their strengths and weaknesses.

We took a deep dive into real-world implementations: the classic UNIX file permissions and their extension with POSIX ACLs, and the sophisticated NTFS ACLs in Windows. We analyzed the advantages of DAC—simplicity, flexibility, and low administrative overhead—and its limitations, particularly the Trojan horse problem and the difficulty of enforcing consistent policies across large organizations. We discussed countermeasures such as least privilege, user education, and application whitelisting.

The case studies illustrated DAC in a small business and a university research lab, demonstrating both its effectiveness and its scalability challenges.

DAC is the most accessible and widely used access control model, but it is not suitable for all environments. In the next tutorial, Tutorial 3.11, we will examine Mandatory Access Control (MAC), which takes a more rigid, centralized approach based on security labels and classifications, providing stronger security guarantees for high-risk environments.

Quiz

Answer the following questions to check your understanding. Click the "Answer" button to reveal the solution.

Q1. In DAC, who typically has the authority to set permissions on an object?

Answer
B) The owner of the object has discretion over who can access it.

Q2. Which of the following is a characteristic of an Access Control List (ACL)?

Answer
B) An ACL is attached to an object and lists which subjects have which permissions.

Q3. What is the major security vulnerability of DAC?

Answer
B) DAC is vulnerable to Trojan horse attacks because a malicious program can run with the user's permissions.

Q4. In UNIX file permissions, the three sets of permissions correspond to:

Answer
A) The three sets are for the owner (user), the group, and others.

Q5. In NTFS ACLs, a Deny entry takes precedence over an Allow entry. This is an example of:

Answer
A) Deny entries are part of the DACL (discretionary ACL) and are a feature of DAC.

Q6. Which of the following is an advantage of capability lists over ACLs?

Answer
A) A capability list is attached to a subject, making it easy to see what the subject can access.

Q7. POSIX ACLs extend classic UNIX permissions by allowing:

Answer
A) POSIX ACLs allow multiple user and group entries, overcoming the single-group limitation.

Q8. The principle of least privilege is particularly important in DAC because:

Answer
A) Granting only the minimum permissions reduces the potential damage of a Trojan horse or compromised account.

Q9. In Windows NTFS, which component of the security descriptor is used for auditing?

Answer
B) The System ACL (SACL) specifies which access attempts to audit.

Q10. Which of the following is not a limitation of DAC?

Answer
C) DAC supports groups (e.g., UNIX groups, Windows groups), so lack of group support is not a limitation.

Q11. In UNIX, the setuid bit on an executable program allows it to:

Answer
A) Setuid allows the program to run with the file owner's permissions, which can be a privilege escalation risk.

Q12. An ACL entry that explicitly denies access to a user is called a:

Answer
C) A Deny ACE is an Access Control Entry that explicitly denies permissions.

Exercises

These exercises are designed to help you apply the concepts from this tutorial. Attempt each exercise before revealing the sample solution.

Exercise 3.10-1: UNIX Permission Analysis

Given the following UNIX permission string: -rw-r--r-- for a file, and the file owner is "alice", group is "staff".

  1. What permissions does Alice have on the file?
  2. What permissions does a user in the "staff" group have?
  3. What permissions does "others" have?
  4. If Alice is also a member of "staff", does she have any additional permissions beyond the owner permissions?
  5. How would you change the permissions to give the "staff" group write access while keeping others read-only?
Sample Solution
  1. Alice: Read and write (rw-), but not execute.
  2. Staff group: Read only (r--).
  3. Others: Read only (r--).
  4. No, the owner permissions take precedence; Alice already has rw-.
  5. Use chmod g+w file to add write permission for the group. The permissions would become -rw-rw-r--.

Exercise 3.10-2: ACL Design

You are managing a file server with the following requirements:

Design an ACL-based solution. Define the groups and permissions. How would you implement this using NTFS ACLs or POSIX ACLs?

Sample Solution

Groups: Finance, HR, Engineering, EngineeringManagers.

Permissions:

  • Finance folder: Allow Finance: Read, Write; Allow HR: Read; Deny others.
  • HR folder: Allow HR: Read, Write; Deny others.
  • Engineering folder: Allow Engineering: Read, Write; Allow EngineeringManagers: Read, Write, Change Permissions; Deny others.

In NTFS, create groups in Active Directory (or local groups) and assign permissions using the Security tab. For POSIX ACLs, use setfacl to add entries for each group.

Exercise 3.10-3: Capability vs. ACL Comparison

In a distributed system, you have a file server and many clients. You need to allow clients to access files. You are considering using ACLs or capability lists. Discuss the trade-offs for the following scenarios:

  1. Many clients, each accessing a small subset of files.
  2. Few clients, each accessing many files.
  3. Need to frequently revoke access from users.
  4. Need to delegate access from one user to another.
Sample Solution
  • Scenario 1 (Many clients, small subset): ACLs are better because they are attached to objects; each object has a small number of entries. Capability lists would be large and cumbersome.
  • Scenario 2 (Few clients, many files): Capability lists may be better because each client has a list of files they can access; ACLs would require many entries on many files.
  • Frequent revocation: ACLs are easier—just remove the entry from the object. Capability lists require invalidating the capability, which is more complex.
  • Delegation: Capability lists support easy passing of capabilities; ACLs require modifying the object's ACL.

Exercise 3.10-4: Trojan Horse Mitigation

A user in your organization downloads a seemingly useful PDF viewer from the internet. The viewer is actually a Trojan horse that, when executed, reads all files in the user's home directory and sends them to an external server. Your system uses DAC. Propose a multi-layered defense strategy to prevent or mitigate this attack.

Sample Solution
  • Technical controls:
    • Application whitelisting: Only allow approved applications to run.
    • Endpoint protection: Antivirus and behavior-based detection.
    • Least privilege: Run users with standard accounts, not administrators.
    • Restrict outbound network connections: Firewall rules to block unauthorized data exfiltration.
    • Use sandboxing: Run untrusted applications in isolated environments (e.g., Windows Sandbox, containers).
  • Administrative controls:
    • User education: Train users to avoid downloading unknown software and to recognize phishing.
    • Security policies: Prohibit installation of unauthorized software.
    • Incident response: Monitor for anomalous outbound traffic and have a response plan.
  • Additional DAC enhancements: Use audit logging to detect suspicious file access patterns and set alerts.

Exercise 3.10-5: DAC Policy Review

You are auditing a small organization's file server. You find that many users have "Full Control" over shared folders that contain sensitive data. Furthermore, several users have direct access to the HR folder. What are the risks? What changes would you recommend to improve security while maintaining usability?

Sample Solution

Risks:

  • Users with Full Control can change permissions, potentially granting access to unauthorized individuals.
  • Excessive permissions increase the impact of a compromised account or Trojan horse.
  • Direct access to HR data violates need-to-know and data privacy regulations.

Recommendations:

  • Apply least privilege: Restrict Full Control to a small group of administrators.
  • Use groups to manage permissions, not individual users.
  • Implement a regular access review process.
  • Restrict HR folder access to HR staff only, using an ACL with explicit deny for others.
  • Consider implementing more granular permissions: e.g., "Read" for users who only need to view, "Write" for those who need to modify.

Homework

These homework questions require deeper analysis, research, and application. Answer each question comprehensively.

Homework 3.10-1: DAC in Operating Systems

Write a 1,000–1,250 word analysis comparing the DAC implementations in UNIX (including POSIX ACLs) and Windows NTFS. Discuss similarities, differences, granularity, ease of administration, and security implications. Provide examples of how each system handles ownership, inheritance, and deny permissions. Evaluate which system you would prefer for a large enterprise environment and why.

Sample Answer

Comparative Analysis: UNIX vs. Windows DAC

  • UNIX (classic + POSIX): Simple three-tier model with extensions for ACLs. Ownership by UID. POSIX ACLs allow multiple users/groups. Inheritance is limited to default ACLs on directories. Deny is implicit (omission) unless using POSIX ACLs with explicit deny.
  • Windows NTFS: Rich ACLs with explicit allow/deny, fine-grained permissions (over 14 distinct rights), inheritance propagation, and support for groups (global, universal, local). Ownership by SID. Administrators can take ownership.
  • Comparison: Windows provides more granular control and better inheritance, making it more suitable for large enterprises. UNIX is simpler but less flexible.
  • Recommendation: For a large enterprise, Windows NTFS with Active Directory group management is preferable due to its scalability and integration with enterprise identity management.

Homework 3.10-2: DAC Policy Development

Develop a comprehensive DAC policy for a university department with 50 faculty and staff, 200 students, and multiple shared resources (file shares, printers, research databases). The policy should cover:

Sample Answer

DAC Policy – University Department

  • Ownership: The creator of a file or folder is the owner. Department heads are owners of department-level folders.
  • Groups: Faculty, Staff, Students, ResearchAssistants, and project-specific groups. Groups are managed by IT.
  • Permissions: Default for new files: owner (read/write), group (read), others (none). For shared folders: appropriate group permissions.
  • Grant/Revoke: Access requests must be approved by the resource owner or department head. IT implements changes.
  • Access reviews: Conducted quarterly for all shared folders; annual for individual files.
  • Emergency: Temporary access can be granted by IT with approval from department head; logged and reviewed.

Homework 3.10-3: Trojan Horse Case Study

Research a real-world incident involving a Trojan horse that exploited DAC to cause damage (e.g., a malware that stole files or encrypted data). Write a 750–1,000 word report describing the incident, how the Trojan operated, the DAC mechanisms it abused, and the countermeasures that could have prevented or mitigated the attack. Discuss the lessons learned for DAC security.

Sample Answer

Case Study: CryptoLocker Ransomware

  • Incident: CryptoLocker (2013) encrypted user files and demanded ransom.
  • Operation: It spread via email attachments. Once executed, it ran with the user's permissions and encrypted all files the user had write access to.
  • DAC abuse: It exploited the user's own permissions to encrypt files; no privilege escalation needed.
  • Countermeasures: Least privilege (limit write access), application whitelisting, regular backups, user education.
  • Lessons: DAC alone is insufficient; additional layers (backups, behavioral monitoring) are needed.

Homework 3.10-4: ACL Optimization

You are the security administrator for a medium-sized company with 500 employees. The company uses Windows file servers with NTFS ACLs. You notice that ACLs have become very complex, with many explicit entries and inconsistent inheritance. Develop a plan to rationalize and simplify the ACLs. Include steps for:

Sample Answer

ACL Rationalization Plan

  • Audit: Use tools like PowerShell (Get-ACL) to export current permissions. Identify orphaned entries and excessive permissions.
  • Design: Create role-based groups (e.g., Finance-RW, HR-R, etc.). Define a permission matrix.
  • Migration: Gradually apply new permissions, test with a pilot group, then roll out. Use scripts to automate.
  • Inheritance: Set inheritance at the top-level department folders and override only when necessary.
  • Training: Educate managers on how to request access and the new group structure.
  • Success metrics: Reduction in ACL entries, improved performance, and faster access request handling.

Homework 3.10-5: DAC and Zero Trust

Write a 1,000–1,250 word essay on the role of DAC in a Zero Trust architecture. Discuss how Zero Trust principles (never trust, always verify, least privilege, micro-segmentation) conflict with or complement DAC. Propose enhancements to DAC, such as continuous validation, to align with Zero Trust. Provide examples of how DAC can be integrated with modern authentication and authorization frameworks.

Sample Answer

DAC in a Zero Trust World

  • Zero Trust principles: No implicit trust, continuous verification, micro-segmentation.
  • DAC conflict: DAC relies on static permissions set by owners; Zero Trust requires dynamic, risk-based decisions.
  • Complementary aspects: DAC's granularity can be used for micro-segmentation; least privilege aligns with Zero Trust.
  • Enhancements: Add continuous authentication and authorization (e.g., re-evaluate access on each request), integrate with risk-based policies, and use ABAC attributes.
  • Integration: DAC can be the base layer, augmented by conditional access policies (e.g., location, device health) provided by identity providers.

Summary

This tutorial provided a comprehensive exploration of Discretionary Access Control (DAC). We defined DAC as a model where the owner of a resource has the discretion to control access, making it intuitive and flexible. We discussed the role of ownership, groups, and delegation, and examined the two primary mechanisms for implementing DAC: Access Control Lists (ACLs) and capability lists. ACLs are the dominant mechanism, attached to objects and listing subjects with their permissions, while capability lists are attached to subjects.

We analyzed real-world implementations: the classic UNIX file permission model (with its three sets: owner, group, others) and its extension with POSIX ACLs, which allow multiple users and groups and inheritance. We also explored the rich NTFS ACLs in Windows, which support fine-grained permissions, inheritance, and explicit deny entries.

We evaluated the advantages of DAC—simplicity, flexibility, and low administrative overhead—and its limitations, including the Trojan horse vulnerability, policy inconsistency, and scalability challenges. We discussed countermeasures such as least privilege, user education, application whitelisting, and the use of complementary controls like auditing and monitoring.

The case studies illustrated DAC in small business and research lab environments, highlighting its effectiveness and the challenges that arise as organizations grow.

DAC is the foundation of access control in most systems, but it is not sufficient for high-security environments or large enterprises with complex governance needs. In the next tutorial, Tutorial 3.11, we will examine Mandatory Access Control (MAC), a more rigid model based on security labels that provides stronger guarantees but requires centralized administration.

© 2026 COMP400 – Computer and Network Security • School of Computing and Information Systems, TrustOpen University • Unit 3: Authentication and Access Control