1

I use the configuration to store auto-save files in /tmp:

(setq backup-directory-alist
      `((".*" . ,temporary-file-directory)))
(setq auto-save-file-name-transforms
      `((".*" ,temporary-file-directory t)))

Emacs seems to create the auto-save-files with the actual permissions of the file changed. I would like to change the umask for auto-save files to 700. How to configure this?

1 Answer 1

1

Put this in init.el to configure the default permissions of all newly created files:

(set-default-file-modes ?\700)

To apply this only to auto-save files I think you could use around advice on make-auto-save-file-name combined with default-file-modes to first store old default permissions, then set new ones, then run the advised function, and finally reset the old default permissions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.