Error opening file: Permission denied – backup creation failure in nano
0 reputation · 14 Feb 2023, 17:46 UTC
Problem context
When nano is invoked with the -B or --backup flag on a file that it cannot write to, the editor reports the message Error opening file: Permission denied and terminates the editing session. The manual documents the backup option but does not clarify what should happen when the backup write fails.
Unresolved behavior
The aborting behavior leaves users uncertain whether nano should instead continue editing without creating a backup, or whether it should provide a configurable fallback. This design choice is not explicitly defined in the documentation.
Questions
- What is the intended design decision behind aborting the session when backup creation fails due to insufficient permissions?
- Is there a configuration option or command‑line flag that allows nano to proceed with editing even when the backup cannot be written?
- How does nano’s manual describe the expected outcome in this scenario, and is that description consistent with current implementations?