From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#3712: 23.1.50; SECURITY: Tramp creates -rwxrwxrwx permission files with /su and /sudo method Date: Mon, 29 Jun 2009 23:15:19 +0200 Message-ID: <87ws6uzqqg.fsf@gmx.de> References: <87ljnbax4h.fsf@iki.fi> <8763eevosc.fsf@iki.fi> Reply-To: Michael Albinus , 3712@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1246311475 586 80.91.229.12 (29 Jun 2009 21:37:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 29 Jun 2009 21:37:55 +0000 (UTC) Cc: 3712@emacsbugs.donarmstrong.com To: Teemu Likonen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jun 29 23:37:48 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MLOXq-0005BJ-B1 for geb-bug-gnu-emacs@m.gmane.org; Mon, 29 Jun 2009 23:37:47 +0200 Original-Received: from localhost ([127.0.0.1]:44433 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MLOXp-0001c8-Q6 for geb-bug-gnu-emacs@m.gmane.org; Mon, 29 Jun 2009 17:37:45 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MLOXc-0001XM-UH for bug-gnu-emacs@gnu.org; Mon, 29 Jun 2009 17:37:32 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MLOXY-0001VV-77 for bug-gnu-emacs@gnu.org; Mon, 29 Jun 2009 17:37:32 -0400 Original-Received: from [199.232.76.173] (port=55183 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MLOXY-0001VO-2o for bug-gnu-emacs@gnu.org; Mon, 29 Jun 2009 17:37:28 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:46970) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MLOXX-0003KY-KF for bug-gnu-emacs@gnu.org; Mon, 29 Jun 2009 17:37:27 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n5TLbOP6011294; Mon, 29 Jun 2009 14:37:25 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n5TLK4Kt008202; Mon, 29 Jun 2009 14:20:04 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Michael Albinus Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Mon, 29 Jun 2009 21:20:03 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 3712 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 3712-submit@emacsbugs.donarmstrong.com id=B3712.12463101327643 (code B ref 3712); Mon, 29 Jun 2009 21:20:03 +0000 Original-Received: (at 3712) by emacsbugs.donarmstrong.com; 29 Jun 2009 21:15:32 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with SMTP id n5TLFQom007633 for <3712@emacsbugs.donarmstrong.com>; Mon, 29 Jun 2009 14:15:28 -0700 Original-Received: (qmail invoked by alias); 29 Jun 2009 21:15:20 -0000 Original-Received: from p57A22293.dip0.t-ipconnect.de (EHLO arthur.local) [87.162.34.147] by mail.gmx.net (mp067) with SMTP; 29 Jun 2009 23:15:20 +0200 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX198njNO57F80hbcPuiVvwIfJ1DJtGbsI29GH1Pdj2 U2Cbi4jixSW1Oo In-Reply-To: <8763eevosc.fsf@iki.fi> (Teemu Likonen's message of "Mon, 29 Jun 2009 22:10:59 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) X-Y-GMX-Trusted: 0 X-FuHaFi: 0.64 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Mon, 29 Jun 2009 17:37:32 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:29091 Archived-At: Teemu Likonen writes: > On 2009-06-29 18:16 (+0300), Teemu Likonen wrote: > >> When method /su: or /sudo: is used to _create_ a file the file's >> permission will be set to -rwxrwxrwx (777), [...] I've committed a fix, to both the trunk and the 23.1 branch. > This also happens when _editing_ an existing file because "backup by > renaming" will move the old file aside and the new version of file is > really creating a new file. > > So, if you want to give your /etc/passwd and /etc/shadow the -rwxrwxrwx > permissions just edit the files with tramp's /su or /sudo method while > having backup by renaming enabled. This I cannot reproduce. I have set `backup-by-copying' to nil. Backups of files under /sudo::... have the same permissions as the original file. Best regards, Michael.