emacs-25.2 not writing to user owned read-only files on Fedora -


this emacs-25.2 question on fedora.

for quite time have been using 'trick' of saving group of files edit read-only in filesystem prevent unintended edits, while looking @ 1 file/buffer, focus being elsewhere.

the default action when using (find-file) makes buffer read-only, wanted. then, if indeed needed edit buffer, toggled c-x c-q, edits made, file saved c-x c-s, set read-only c-x c-q.

at point, behavior, regular user, has been sidetracked. still works root, apparently, can't see hooks or unusual variables different.

has else solved this?

all right, here how demonstrate, regular user:

$ touch bar $ ls -l total 0 -rw-r-----. 1 dithot dithot 0 sep 13 21:28 bar $ chmod 0440 bar $ ls -l total 0 -r--r-----. 1 dithot dithot 0 sep 13 21:28 bar $ emacs -q bar > c-xc-q > edit... > c-xc-s > msg: file bar write-protected; try save anyway? (yes or no) > reply yes > file saved. > c-x c-q $ ls -l total 4 -r--r-----. 1 dithot dithot 10 sep 13 21:30 bar -r--r-----. 1 dithot dithot  0 sep 13 21:28 bar~ 

i notice backup file made, have disabled, not sure if relevant. note works fine if root, not root generally.

that said, looks lisp code have prevents working once config loaded.

so, know now.

are sure emacs ever had behaviour want? don't remember being ever being case.

c-x cq toggles whether buffer read-only or not, of course regular user, toggling read-only status of buffer doesn't mean can write file has read-only permissions. root user, of course can bypass file permissions, work wish.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -