From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#60460: 30.0.50; [FR] avoid putting remote files to local trash Date: Tue, 03 Jan 2023 09:47:42 +0100 Message-ID: <87bkngdmxd.fsf@gmx.de> References: <87358tfglk.fsf@gmx.de> <87mt71dxhf.fsf@gmx.de> <87ilhoeqlf.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6068"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: ruijie@netyu.xyz, 60460@debbugs.gnu.org To: Jean Louis Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jan 03 09:49:53 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pCczZ-0001Lx-1d for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 03 Jan 2023 09:49:53 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pCcz9-0001qv-V7; Tue, 03 Jan 2023 03:49:29 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pCcyl-0001f7-CR for bug-gnu-emacs@gnu.org; Tue, 03 Jan 2023 03:49:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pCcyk-0007Yr-T7 for bug-gnu-emacs@gnu.org; Tue, 03 Jan 2023 03:49:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pCcyk-0007wr-8z for bug-gnu-emacs@gnu.org; Tue, 03 Jan 2023 03:49:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 03 Jan 2023 08:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60460 X-GNU-PR-Package: emacs Original-Received: via spool by 60460-submit@debbugs.gnu.org id=B60460.167273570630505 (code B ref 60460); Tue, 03 Jan 2023 08:49:02 +0000 Original-Received: (at 60460) by debbugs.gnu.org; 3 Jan 2023 08:48:26 +0000 Original-Received: from localhost ([127.0.0.1]:44669 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCcyA-0007vx-93 for submit@debbugs.gnu.org; Tue, 03 Jan 2023 03:48:26 -0500 Original-Received: from mout.gmx.net ([212.227.17.21]:57041) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCcy7-0007vW-6d for 60460@debbugs.gnu.org; Tue, 03 Jan 2023 03:48:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1672735663; bh=CXOWCN4ZSsBjbkGyyQQ7z9EXkyYzAt+219g8skzcQVg=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=moR5fB3MNImiYjs8YKaHzfBSmgpwWjVj8apk6ZkH+rQ9u+a4Mc8DX0HK3FpmbZM7C isjxAyTZsopkUgOnvjBGIysfA2yZO176nayygSexzTUbK0U1wYXsrEsmNfhLMUjQNq 5+bbL4vzyCdYkywdO3gqf8luSLCkVjgwCRTEwkthRoze6/x6F05lv3QoVua4riQ0ej vbauc5GRu08eoUWRNuChu4aj/5wtGk9p3gRmb6mWKvlSpbO/YxNXMfBUDlE0kILeoW YzrzPhl4Y62xN3kOxir+BjLUggVMxn5zNOxN/8pn6mgw9jw3NRfUm55YfvvIyVHYlM jvlGDiuup5XZg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from gandalf.gmx.de ([185.89.37.45]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MKKYx-1pWcoS2f79-00Lleg; Tue, 03 Jan 2023 09:47:43 +0100 In-Reply-To: (Jean Louis's message of "Mon, 2 Jan 2023 23:37:45 +0300") X-Provags-ID: V03:K1:YzMtqU8OkTgnie+MBsBVnaiWEuMEgpGMIZN5HMxTWNAaBw0N1oM HSCAG9JYFiLB5vwCI++U0YWSEaeFPBS97dn93KEbiWrxxStk5AGYxyNfNhF5TT8YeIj2NwI lh7QY1BhirlrvsSuJtgCl043SLbE+O97BlXARh1BPBa4P+5lJg3gPZ1ZIB0Vg1/yM4mfW5v QyLiXEpIzJBSsHDi+0x2A== UI-OutboundReport: notjunk:1;M01:P0:5l+1A6t8XkA=;5KzGSoePiw/RryWTu0XLH+sVFHr Vvl/svAA/7UfvcKIpaJP/f39f+l5q/XmhI1ZLePEWN3YMfu1y8mes1oLxnYFKjpd3H89vvQmV R/Fd4SlE+1uA5zr/0Sr3D2+Lyf+DQvZ6bu5tSvGWQG2aiM+XjnZasZhl8ayi1qB8X79U+4Vi4 c8ikAd8xzK9AVlEtaryWPFnlyFOsiy0gT9+PkulQJ353RZV+7gdRtwYcY3NG+q9r3Pqvhj9ih x5fJCVhaghgfB4qJRA5i6z2SBzv5w0y/qvGdy5VUnz9Bm5cUhsj15rZlew0WfHXyu0Y26UCay 44QW4g4eU9pSBHkfSP9XcPD8xQEOm8v8m9Metqr5jj+MbcSK6as2TADpjLcRRG6Mp2e14DGGr OK3ZjduXEsPMGVe6iHu5YDeccaB6VPas8tjY9olGEkIHvQwQhjtjbMUQt3cR4tef39yc8YHC0 e3K7cBk9DJPACF01rHkCRPXFzHfS+8/TgdxhhVOpckcGmf8LjbcM4ykp1DpTvV9cML7sDC2ca tdcxkuCjvcYbyvjE8HJqj4C71mhvfOd7MJ8OfRot9AJdjo8vB5HygIx6cpiQkSzdxJQjB3fVH nXTSYRRwC5a00087FLZ6h7qenrTCLBy0k705zjQoaod5AhW1F4KoDYpDDqrXQOtou2U7L/zz0 d/jp/BVvGTsS07nXl78uhKxNPMCzSVVrxm8WzdfY/qR8V8wri8Dibf8IWOCxSiQsQ+OQSecio /XRkupPSPCRhNfRKVgFpLWluxKsqfn9ffkNSA+RPShcDkIHRo/cYtEiosuRCY1OMhmXynNVe X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:252379 Archived-At: Jean Louis writes: Hi Jean, > Those are decisions of administrator and user. Permissions they put on > files is their decision and freedom. > > Any file owned by root and moved to user's home directory somewhere in > the Trash, will have how I tested it, same permission as in root > accessible directories. Let us say /etc or /usr and so on, those files > are anyway either visible by users or some of them in /etc protected > by permissions. Those are system decisions. > > Who has sudo rights is system administrator, not necessarily main, but > then those people made decisions. > > And moving into trash is useful, especially in case of files in /etc > > Let administrators decide what they want. > > Emacs is high level interface, not low level. On high level there is > almost nothing to be decided what people decided on low level. > > For me is not logical to try to prevent people what they want. > > Give them option, but don't try preventing them on that high level to > do this or that, what they otherwise can do in their system by using > different file manager. > > If I can run other file manager with sudo and move to Trash anywhere > it is specified, then let it be for Emacs users too, as by trying to > "secure" something what otherwise was decided on low level, makes no > sense. > > We can't say later "Emacs is more secure as file manager because it > does not allow you to move files managed with sudo to Trash" -- > because it is not "more secure" as it is high level, not low level. All true, but there are individual decisions by users. I don't see why we shall add a special case for sudo (and su, doas, sudoedit, sg, ...) - all of them identify remote (possibly root owned) files and shall be handled as such. And then, there are also multi-hop remote file names, which would need another handling then for sudo and friends. `remote-file-name-inhibit-delete-by-moving-to-trash' is just an offer as convenience user option, nobody is obliged to use it. There are still connection-local variables or `system-move-file-to-trash' for users with the need of more fine-grained configuration. > Right now I use my function `system-move-file-to-trash' as recommended > by function `move-file-to-trash' and that is great option, I like that > configuration, so I can decide myself what get moved to Trash and what > not, so I will expand it to recognize sudo paths. Sigh. Best regards, Michael.