Skip to content
TheChatArchiveThe Chat Archive
Hunyuanhunyuan-turbos-20250416· TencentHugging Face LMArena Human Preference 140K

cacls "C:\path\to\your\file.txt" /E /D "NT AUTHORITY\SYSTEM":W No mapping between…

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with Claudeclaude-3-5-sonnet-20241022’s answer.
  1. User

    cacls "C:\path\to\your\file.txt" /E /D "NT AUTHORITY\SYSTEM":W No mapping between account names and security IDs was done.

  2. Hunyuan Assistant

    The error:

    No mapping between account names and security IDs was done.
    

    means that Windows could not resolve the account name you provided — in this case, "NT AUTHORITY\SYSTEM" — to a valid Security Identifier (SID). This usually happens due to one of the following reasons:


    ✅ Root Causes & Fixes

    1. ❌ You're using cacls, which does not support NT AUTHORITY\SYSTEM directly

    cacls is a very old tool and does not recognize NT AUTHORITY\SYSTEM as a valid user name. It only supports basic users and groups like Everyone, Administrators, or a username like DOMAIN\user.

    👉 Solution: Use icacls instead, which does support NT AUTHORITY\SYSTEM.


    ✅ Correct Command Using icacls:

    icacls "C:\path\to\your\file.txt" /deny "NT AUTHORITY\SYSTEM":(OI)(CI)(WD,AD,WEA,WA)
    

    Explanation of Permissions:

    PermissionMeaning
    WDWrite Data
    ADAppend Data
    WEAWrite Extended Attributes
    WAWrite Attributes

    These are the equivalents of:

    • FILE_WRITE_DATA
    • FILE_APPEND_DATA
    • FILE_WRITE_EA
    • FILE_WRITE_ATTRIBUTES

    2. 🧪 If you're unsure whether the user/group exists, check with:

    Use whoami /groups or net user to test local/remote users

    But better yet, to verify if NT AUTHORITY\SYSTEM is recognized:

    whoami /all
    

    Or:

    net user "NT AUTHORITY\SYSTEM"
    

    ❗ That net user command will fail, because SYSTEM is not a user account but a well-known security principal, and net user only works for local or domain user accounts.

    ✅ But icacls does recognize NT AUTHORITY\SYSTEM, so just use it.


    3. 🛠️ Alternative: Use SID (Not recommended unless necessary)

    You can also use the SID for SYSTEM (S-1-5-18) with icacls, but this is not recommended unless scripting in automation environments where the name is not available.

    icacls "C:\path\to\your\file.txt" /deny *S-1-5-18:(OI)(CI)(WD,AD,WEA,WA)
    

    ⚠️ Again, this is not needed in most cases. Stick with the friendly name NT AUTHORITY\SYSTEM in icacls.


    ✅ Final Recommendation

    Use icacls like this:

    icacls "C:\path\to\your\file.txt" /deny "NT AUTHORITY\SYSTEM":(OI)(CI)(WD,AD,WEA,WA)
    

    This will:

    • Deny write access to SYSTEM
    • Apply to both files and subfolders
    • Preserve existing permissions (/deny does not overwrite ACLs)

    If you still want to use cacls, you must restrict yourself to local users/groups like Everyone, Administrators, or a real user account, but not SYSTEM.

    Let me know if you'd like help generating a full script to apply this recursively to a folder tree.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.