Questions tagged [permissions]

21 questions
10
votes
4 answers

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
  • 215
  • 4
  • 11
5
votes
1 answer

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 protected files with some directory permissions'…
gavenkoa
  • 3,352
  • 19
  • 36
4
votes
0 answers

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 Full Disk Access in my System Preferences. I can…
3
votes
1 answer

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 sticky bit says that any new file created in that…
Norman Ramsey
  • 1,113
  • 6
  • 13
3
votes
1 answer

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. This is a little annoying; is there a way to…
greatBigDot
  • 153
  • 3
2
votes
0 answers

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 not permitted) How do I preview the file and…
Saurabh
  • 211
  • 1
  • 10
2
votes
1 answer

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 user staff 39 10 Dec 20:49 setup.py When I…
miguelmorin
  • 1,751
  • 11
  • 33
1
vote
1 answer

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 `((".*" ,temporary-file-directory t))) Emacs seems to create the…
ceving
  • 1,308
  • 1
  • 14
  • 28
1
vote
0 answers

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 currently do is to open them, run write-file and…
1
vote
1 answer

"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 `/Users/myname/Documents/' I can open the file via…
fegax
  • 35
  • 5
1
vote
1 answer

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 another user to read the file, I would rather…
ideasman42
  • 8,375
  • 1
  • 28
  • 105
1
vote
0 answers

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. Would be a way to /sudo::/directory, but binded…
Renan41
  • 65
  • 5
0
votes
0 answers

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 I update packages via the built-in package…
Steve
  • 1
0
votes
1 answer

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/tty*. Probably something like: # sudo usermod -aG…
Garid
  • 545
  • 1
  • 13
0
votes
2 answers

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 full disk access) doesn't work. When I try to…
Ryo
  • 125
  • 5
1
2