When trying to edit the sudoers file /etc/sudoers using CotEditor, I get the following message:
The document “sudoers.tmp” could not be opened. You don’t have permission.
To Reproduce
Run the following command:
EDITOR="cot -w" sudo visudo
Expected behavior
The sudoers temporary file /etc/sudoers.tmp should open in CotEditor and be edited normally.
CotEditor version
CotEditor: 4.8.6 (655)
macOS version
macOS Version 14.5 (Build 23F79)
Additional context
Another issue that may be related is editing config files using chezmoi. When I try to edit a file using a command like EDITOR="cot -w" chezmoi edit ~/.zshrc, the file opens as a temporary file in a chezmoi-* directory under $TMPDIR, however, when I try to save the changes, I get this message:
The document “.zshrc” could not be saved. The file is locked.
and when I hit "Save Anyway", I get this message:
You don’t have permission to save the file “.zshrc” in the folder “chezmoi-edit566696390”.
Description
When trying to edit the sudoers file
/etc/sudoers
using CotEditor, I get the following message:To Reproduce
Run the following command:
Expected behavior
The sudoers temporary file
/etc/sudoers.tmp
should open in CotEditor and be edited normally.CotEditor version
CotEditor: 4.8.6 (655)
macOS version
macOS Version 14.5 (Build 23F79)
Additional context
Another issue that may be related is editing config files using chezmoi. When I try to edit a file using a command like
EDITOR="cot -w" chezmoi edit ~/.zshrc
, the file opens as a temporary file in achezmoi-*
directory under$TMPDIR
, however, when I try to save the changes, I get this message:and when I hit "Save Anyway", I get this message: