id: os_world_writable_system_folder_configure
title: Ensure No World Writable Files Exist in the System Folder
discussion: |
  Folders in /System/Volumes/Data/System _MUST_ not be world-writable.
references:
  nist:
    cce:
      macos_27:
        - CCE-XXXXX-X
      macos_26:
        - CCE-95333-1
      macos_15:
        - CCE-94327-4
      macos_14:
        - CCE-92924-0
  cis:
    benchmark:
      macos_26:
        - 5.1.6 (level 1)
      macos_15:
        - 5.1.6 (level 1)
      macos_14:
        - 5.1.6 (level 1)
    controls_v8:
      - 3.3
platforms:
  macOS:
    '27.0': {}
    '26.0':
      benchmarks:
        - name: cis_lvl1
        - name: cis_lvl2
    '15.0':
      benchmarks:
        - name: cis_lvl1
        - name: cis_lvl2
    enforcement_info:
      check:
        shell: /usr/bin/find /System/Volumes/Data/System -type d -perm -2 -ls | /usr/bin/grep -vE "downloadDir|locks" | /usr/bin/wc -l | /usr/bin/xargs
        result:
          integer: 0
      fix:
        shell: |-
          IFS=$'\n'
          for sysPermissions in $( /usr/bin/find /System/Volumes/Data/System -type d -perm -2 | /usr/bin/grep -vE "downloadDir|locks" ); do
            /bin/chmod -R o-w "$sysPermissions"
          done
tags:
  - cisv8
