.env File Cannot Be Edited by Claude (Even with Privacy Mode Disabled)

  • Message:
    Hello Cursor Team,
    Previously, Claude could edit my .env file without issue. However, now—even with all permissions granted—Claude cannot edit or apply changes to the .env file. A lock icon (⦸) is shown, and “Apply to file” does not work. Other files work perfectly.

Current Settings:

  • Privacy Mode: Disabled (Data Shared with Cursor)
  • Privacy Mode with Storage: Active
  • IDE restarted
  • I am the Admin
  • Claude can apply changes to all other files except .env

Is there a hardcoded restriction on .env files?
This becomes a major blocker in Laravel and other framework environments where environment file management is essential.

create a file in root called .cursorignore

and add this line

!.env.local
!
.env

Thank you

1 Like

Hey, it’s because it’s in the global list. You can remove it, and it will become available.