Skip to main content
20 votes
Accepted

Change permission of file

The easy to remember (if you are used to unix) way is M-x chmod which is an alias of set-file-modes Then there is the question of how to get the filename. The default is the current file but the ...
icarus's user avatar
  • 1,924
8 votes

Change permission of file

The dired way Create the file: C-x C-f Save it to disk: C-x C-s Open the file in dired mode with C-x C-j (Emacs 28). Emacs < 28: If you have dired-x loaded [1], jump to the file in dired using C-x ...
Dieter.Wilhelm's user avatar
5 votes
Accepted

How to disable automatic appearance of *Warnings* buffer in Emacs?

If you don't need the creation of lock files you can just disable it completely. This can be done by adding the following line to your .emacs or init.el file: (setq create-lockfiles nil) If it is not ...
Karim Aziiev's user avatar
3 votes

Saving file resets executable bit

As @phils mentioned in a comment, the reason is the default backup policy (from C-h i g (emacs)Backup Copying): Backup files can be made by copying the old file or by renaming it. ... The ...
emonigma's user avatar
  • 1,927
2 votes
Accepted

How to set the file-permissions of a buffer before it's written?

Change your umask so that only your user can read newly–created files. Note that this can be done in the shell before you start Emacs (shells usually provide a command called umask for this purpose), ...
db48x's user avatar
  • 18.4k
2 votes

Change permission of file

Open the directory which contains the file. Emacs will automatically be in the dired major mode for this buffer. Optionaly press 's' to list last modified files at the top. Move the cursor to the file ...
StefanQ's user avatar
  • 161
1 vote

Emacs can't run external programs

This has nothing to do with the file permissions of the Emacs binary, that’s for sure. That just tells you who is allowed to run Emacs, nothing else. 0755 allows everyone to run it, but only root can ...
db48x's user avatar
  • 18.4k
1 vote

Permissions for Auto-Save files

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-...
orgtre's user avatar
  • 1,100
1 vote

macOS Desktop access: "Reading directory: Operation not permitted"

I'm facing similar issue when upgrade Emacs. I suggest resetting Emacs privacy permission by sudo tccutil reset All org.gnu.Emacs and add full disk access to Emacs.app again in system preferences.
Tianshu Wang's user avatar
  • 1,784
1 vote

"Opening directory permission denied `/Users/myname/Documents/'" in Spacemacs on MacBook Air M1

Make sure you give Emacs the permissions to access Folders you want. For convenient, I usually give Emacs Full Disk Access. However, sometimes authorization window do not know why can not pop up, you ...
Tianshu Wang's user avatar
  • 1,784
1 vote

Restore privileged folder access for previously working Emacs.app on Catalina (NOT system upgrade)

Investigating this problem, i was able to see a Console.app error from process tccd, (i think this is the "Transparency Consent and Control System" daemon). The error was Failed to copy ...
nate's user avatar
  • 63
1 vote
Accepted

How to get TRAMP to respect group sticky bit?

This is an error in Tramp. I will fix it, available with the next Emacs version (27.1) and/or Tramp version (2.4.2).
Michael Albinus's user avatar
1 vote
Accepted

How do I prevent backups of scripts from being made executable?

The variable backup-directory-alist tells emacs where to save the backups. Adding the following to your init file will set its value only if the executable bit is set. (defun make-executable-backup-...
matteol's user avatar
  • 2,038
1 vote

Get Administrator privileges on Windows via TRAMP?

Windows attaches security token to an app which cannot be changes unless you spawn another process. So sudo-like functionality makes sense. But Windows security is a bit complicated - not for user ...
gavenkoa's user avatar
  • 3,462
1 vote

why is save-buffer asking for a chmod?

Do the following: M-: (setq debug-on-quit t) RET reproduce the problem when asked whether to perform the chmod, hit C-g hopefully this will give you a backtrace showing which code is doing that. If ...
Stefan's user avatar
  • 26.5k

Only top scored, non community-wiki answers of a minimum length are eligible