Questions tagged [permissions]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
10 votes
4 answers
8k views

Change permission of file

I use GNU Emacs 24.3.1 and want to create a new buffer and execute that directly without using terminal and chmod. Is there a way to change the permission of a saved buffer (file) directly from emacs?...
hasanghaforian's user avatar
5 votes
1 answer
186 views

Get Administrator privileges on Windows via TRAMP?

I constantly use /sudo::/ URI schema on Linux to edit protected files. Is there something similar on Windows? Currently I start Emacs with Administrator privileges but that can lead to write ...
gavenkoa's user avatar
  • 3,412
4 votes
0 answers
2k views

Emacs won’t access Documents directory on MacOS Big Sur

I am running Emacs 26.3 on MacOS 11.2.1 “Big Sur”. When I try to open the directory ~/Documents, it fails with the message “Listing directory failed but ‘access-file’ worked.” Emacs.app is given ...
Mikelis Bickis's user avatar
3 votes
1 answer
44 views

How to get TRAMP to respect group sticky bit?

In using TRAMP to create a new file in a remote (Unix) directory, I discovered that TRAMP is not respecting the group sticky bit in that directory. As is standard on a Unix system, the group ...
Norman Ramsey's user avatar
3 votes
1 answer
108 views

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

If I edit an executable script, say foo.sh, then upon saving emacs makes the backup file foo.sh~. That's all well and good, but if the original file has the executable bit set, then so does the backup....
greatBigDot's user avatar
2 votes
1 answer
154 views

Saving file resets executable bit

I have a file setup.py created with Emacs and I set 744 permissions to it: $ ls -la total 8 drwxr-xr-x 3 user staff 96 10 Dec 20:49 . drwxr-xr-x 6 user staff 192 10 Dec 20:47 .. -rwxr--r-- 1 ...
miguelmorin's user avatar
  • 1,897
2 votes
1 answer
430 views

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

I am using Spacemacs and I am getting this error in HELM when I am trying to go in the Documents folder via HELM on my MacBook Air M1 computer: @@@@file-error: Opening directory permission denied `/...
fegax's user avatar
  • 45
2 votes
0 answers
302 views

pandoc: getCurrentDirectory:getWorkingDirectory: permission denied (Operation not permitted)

I'm trying to render the output of a markdown file using C-c C-c p. On doing so, a webpage opens on my browser displaying pandoc: getCurrentDirectory:getWorkingDirectory: permission denied (Operation ...
Saurabh's user avatar
  • 213
1 vote
1 answer
543 views

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

I use Emacs (version 28.1 on Windows 11-64bits) with AUCTeX to work with my LaTeX documents. The directory of files on which I'm working is synchronized in real time with a Dropbox cloud. This means ...
user17911's user avatar
  • 143
1 vote
1 answer
43 views

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

Is it possible to set the permissions on a buffer before it's written to a file? Or is it necessary to change the permissions after writing it? (technically this would allow some small time-frame for ...
ideasman42's user avatar
  • 8,736
1 vote
1 answer
58 views

Permissions for Auto-Save files

I use the configuration to store auto-save files in /tmp: (setq backup-directory-alist `((".*" . ,temporary-file-directory))) (setq auto-save-file-name-transforms `((".*&...
ceving's user avatar
  • 1,348
1 vote
2 answers
381 views

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

I use macOS Monterey, and my problem appears to be similar to Getting operation not permitted when trying to open projects or use integrated terminal in emacs-doom but the solution there (giving ruby ...
Ryo's user avatar
  • 135
1 vote
0 answers
56 views

How to open file with it being editable but not writeable?

I teach, and I like to use real files as examples in class. I want to be able to edit the buffer to show student things, but I don't want to risk accidentally writing the changes on the file. What I ...
elPolloDiablo's user avatar
1 vote
0 answers
23 views

How to Set Visit File Keystroke to Ask Root Password If Needed in Dired Mode

Trying here to accelerate root file editing via dired mode. That way thought in somehow adjust visit file keystroke f, as default, to either ask for root password or to enter it as root automatically....
Renan41's user avatar
  • 65
1 vote
1 answer
1k views

Test file permissions in Windows

The file-writable-p docstring says: Return t if file FILENAME can be written or created by you. In Windows you cannot usually write on files when they are used by a different app. In these ...
antonio's user avatar
  • 1,802
0 votes
1 answer
58 views

Emacs can't run external programs

I'm running Emacs 27.2 on a Red Hat Enterprise Linux 9 virtual machine, on which I do not have admin privileges. I reach this VM either using TigerVNC or plain old SSH. This installation of Emacs ...
Rodney Price's user avatar
0 votes
1 answer
99 views

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

This is similar to How to Restore File System Access in macOS Catalina but the problem is different. I did not upgrade my operating system, only the app, and none of the solutions there are valid ...
nate's user avatar
  • 63
0 votes
0 answers
36 views

Cannot save as root with tramp: “Unlocking file: Permission denied”

I'm using Emacs 27.1 in the terminal with tramp version 2.4.3.27.1. This is on a remote server over SSH. I can load files as root using tramp paths such as: /sudo:root@hostname:/etc/hosts or /sudo::/...
Ian Mackinnon's user avatar
0 votes
0 answers
24 views

Emacs unable to delete old package folders after package update from Google Drive

I am having an odd permissions issue with emacs 28.1 on Windows 11. My Home folder located in my Google Drive. The windows HOME environment variable is pointing to this folder and all works well. When ...
Steve's user avatar
  • 1
0 votes
1 answer
179 views

How to open serial-port with root privileges

When I try to open /dev/ttyUSB0 with serial-term, following permission error shows: Opening serial port: Permission denied, /dev/ttyUSB0 I know I can add my user to a group that has access to /dev/...
Garid's user avatar
  • 619
0 votes
0 answers
160 views

Emacs permission issues

I'm struggling trying to send email using mu4e. All is good using smtp but emacs does not want to go further as it stops saying it's impossible to create a directory (permission denied). Here is the ...
Guillaume's user avatar
  • 189
0 votes
2 answers
825 views

Emacs on Windows won't save

I'm a total beginner to Emacs. I followed the tutorial that came with it, but when I tried to use C-x C-s, the echo area shows the message Opening output file: Permission denied, c:/Program Files (x86)...
awe lotta's user avatar
  • 101
0 votes
1 answer
46 views

File within a root grandparent is detected by emacs as belonging to a directory that doesn't exists

I'm editing a file within a directory /parentdir/userdir/file with the following permissions: $ sudo namei -l $(pwd) drwxr-xr-x root root / drwx------ root root parentdir drwx--S--- ...
ABu's user avatar
  • 280
-1 votes
1 answer
90 views

why is save-buffer asking for a chmod?

All of sudden, XEmacs 21.4.22 starts asking whether it should chmod a+x $f everytime I try to save a buffer that is in Shell-script mode. Switching it to fundamental-mode stops that behaviour. ...
PypeBros's user avatar