Philip Hands <p...@hands.com> wrote: > Not if you take into account the fact that someone will have had to do > something like :wq! to get past the read-only state of the file. > > vim put's a [RO] after the filename when you open it, and says this when > you try to write it: > > E45: 'readonly' option is set (add ! to override) > > in emacs, you get %% in the status line, and it tells you the file's > read-only when you start trying to edit it, and refuses to do so until > you type C-x C-q to flip it's read-only status. > > nano sadly doesn't seem to notice :-/
I just tried this, when you open a read-only file as a normal user it gives you a warning. edward@x230:~$ touch test edward@x230:~$ chmod 400 test edward@x230:~$ nano test Nano says: [ Read 0 line ( Warning: No write permission) ] It won't let me save the file with the same name, I get this error: [ Error writing test: Permission denied ] When running as root the warning and error disappear, there is no indication that the file is read-only. -- Edward. -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20141123092558.GA12017@x230