GNU bug report logs - #3712
23.1.50; SECURITY: Tramp creates -rwxrwxrwx permission files with /su and /sudo method

Previous Next

Package: emacs;

Reported by: Teemu Likonen <tlikonen <at> iki.fi>

Date: Mon, 29 Jun 2009 15:25:05 UTC

Severity: serious

Done: Teemu Likonen <tlikonen <at> iki.fi>

Bug is archived. No further changes may be made.

Full log


Message #19 received at 3712 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Teemu Likonen <tlikonen <at> iki.fi>
Cc: 3712 <at> debbugs.gnu.org
Subject: Re: 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
Teemu Likonen <tlikonen <at> iki.fi> 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.



This bug report was last modified 16 years and 21 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.