GNU bug report logs - #74674
30.0.91; Can't delete an empty symlink when trashing is enabled for root

Previous Next

Package: emacs;

Reported by: the_wurfkreuz <the_wurfkreuz <at> proton.me>

Date: Tue, 3 Dec 2024 19:54:02 UTC

Severity: normal

Found in version 30.0.91

Full log


Message #20 received at 74674 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Jim Porter <jporterbugs <at> gmail.com>
Cc: "74674 <at> debbugs.gnu.org" <74674 <at> debbugs.gnu.org>,
 the_wurfkreuz <the_wurfkreuz <at> proton.me>
Subject: Re: bug#74674: 30.0.91; Can't delete an empty symlink when trashing
 is enabled for root
Date: Wed, 1 Jan 2025 19:53:58 -0600
Jim Porter <jporterbugs <at> gmail.com> writes:

> 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.

Should the bugs be merged perhaps?




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.