Skip to content

Unable to set public.folder or public.data in macOS 26.4 #12

Open

Description

@jason5122

Hi, I noticed that after updating to macOS 26.4, commands that try to set public.folder/public.data fail. I can confirm these worked on macOS 15 and macOS 26.x before 26.4. I used a fresh macOS install on a VM to test both 15.6.1 and 26.4.1.

$ utiluti type set public.folder com.apple.finder
cannot set default app for public.folder (error -50)
$ utiluti type set public.data com.apple.finder
cannot set default app for public.data (error -50)

I also noticed duti emits the same error -50 when trying to override public.folder/public.data.

I'm interested in setting a Finder replacement (ForkLift in my case) as the default handler for folders. Do you know if Apple is explicitly preventing us from doing so?

Activity

  1. scriptingosx commented on Apr 14, 2026

    @scriptingosx
    Owner

    this is quite certainly a limitation from the system.

    I can recreate the problem. I get error -50 when trying to set the default for public.folder and public.data

    Unfortunately, Apple doesn't document any of this. Please file feed back with them. 🤷

  2. ssbarnea commented on May 5, 2026

    @ssbarnea

    I wonder if sudo might help here... basically Apple prevents us from ditching their TextEdit.app

    > utiluti type public.data
    /System/Applications/TextEdit.app
    
    > utiluti type set public.data /Applications/Cursor.app
    cannot set default app for public.data (error 1)
    
    > utiluti type set public.data com.todesktop.230313mzl4w4u92
    cannot set default app for public.data (error -50)

    That is bummer as that seems to be the only way to make all dotfiles (files starting with dot and likely no extension) open in your preferred editor.

  3. uuip commented on Jul 19, 2026

    @uuip
    docker-templates/pause [ main][🐳 colima]
    ❯ utiluti file get-uti ./Dockerfile
    public.data
    
    docker-templates/pause [ main][🐳 colima]
    ❯ utiluti file app ./Dockerfile
    /System/Applications/TextEdit.app
    
    docker-templates/pause [ main][🐳 colima]
    ❯ utiluti app id /Applications/Visual\ Studio\ Code.app 
    com.microsoft.VSCode
    
    docker-templates/pause [ main][🐳 colima]
    ❯ utiluti type set public.data com.microsoft.VSCode
    cannot set default app for public.data (error -50)

    I have always wanted to change the default application associated with Dockerfile, but I have never been able to do it successfully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    supportsupport question

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions