GNU bug report logs -
#74674
30.0.91; Can't delete an empty symlink when trashing is enabled for root
Previous Next
Full log
View this message in rfc822 format
On 12/4/2024 12:47 PM, the_wurfkreuz via Bug reports for GNU Emacs, the
Swiss army knife of text editors wrote:
> The problem got even more complicated. Now i'm trying to just delete any
> file, and i can't do that whether i have trashing enabled or not:
>
> ~/.emacs.d $ (require 'em-tramp)
> em-tramp
> ~/.emacs.d [1] $ eshell/sudo touch /usr/local/bin/test-file
> ~/.emacs.d $ eshell/sudo rm /usr/local/bin/test-file
> Removing old name: Permission denied, /usr/local/bin/test-file
This is the correct behavior; you shouldn't be able to delete the file
using this method. In short, "/usr/local/bin/test-file" refers to a
*local* file name, so it's not going through Tramp's "sudo" method, and
thus it's correct to report that you don't have permission.
Some more detail: Eshell built-in commands like "rm" (which the built-in
"eshell/sudo" will call) treat absolute file names as ordinary, local
files, just like the rest of Emacs would. Specifically, it won't
automatically prepend the "/sudo::" method to it. Doing that is
bug#70792, which I have a patch for but haven't finished yet.
This bug report was last modified 165 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.