I am trying to delete a file that is owned by root from Emacs dired
opened as a regular user.
I get the following error:
(file-error Removing old name Permission denied /opt/file)
How can I execute this command with root privileges?
I am trying to delete a file that is owned by root from Emacs dired
opened as a regular user.
I get the following error:
(file-error Removing old name Permission denied /opt/file)
How can I execute this command with root privileges?
Use Tramp. Instead of running dired
in /opt
, run it in /sudo::/opt
. This gives you root permissions.