From: Ian Eure <ian@digg.com>
To: Kevin Rodgers <kevin.d.rodgers@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Weird tramp scp permissions issue with
Date: Sat, 8 Nov 2008 13:05:12 -0800 [thread overview]
Message-ID: <97F3A065-7FFD-4661-868F-5D9E8724A4E8@digg.com> (raw)
In-Reply-To: <gf4tm7$6mj$1@ger.gmane.org>
On Nov 8, 2008, at 12:43 PM, Kevin Rodgers wrote:
> Ian Eure wrote:
>> Any file I create on a remote host using tramp's scp method gets a
>> mode of 0600, rather than the 0644 I would like. If I use the
>> (slower) ssh method, the file gets the correct mode.
>> What seems to be happening is that the local file gets created with
>> 0600, which is preserved when it's SCP'd over. Indeed, 'tramp-
>> methods shows that the `-p' argument is passed to scp, which does
>> exactly this.
>> My umask is 0022 on both ends, which is correct. So tramp seems to
>> be creating the file with 0600 before it copies it.
>> Does anyone know how I can fix this?
>
> ,----[ C-h f default-file-modes RET ]
> ,----[ C-h f set-default-file-modes RET ]
>
> For the familiar octal notation:
>
> (format "%03o" (default-file-modes))
>
This shows the default mode is "755", not 0600. If this were the
source of the problem, all files created with Emacs would be created
with that mode, not just ones with Tramp. Files created locally, or on
a remote machine via the ssh method get the correct (0644) mode. Only
files created on a remote machine with the scp method get mode 0600.
Digging through tramp.el, I found: tramp-set-auto-save-file-modes,
"Set permissions of autosaved remote files to the original
permissions." It has a hard-coded "0600" in it, and this is the only
place I see any specific permissions in the Tramp source. I changed
that to 0644, and eval'd the function. It didn't change anything, I
still get the same behavior.
- Ian
next prev parent reply other threads:[~2008-11-08 21:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-07 17:30 Weird tramp scp permissions issue with Ian Eure
2008-11-08 20:43 ` Kevin Rodgers
2008-11-08 21:05 ` Ian Eure [this message]
2008-11-16 18:59 ` Michael Albinus
2008-11-16 19:07 ` Ian Eure
2008-11-16 19:59 ` Michael Albinus
2008-11-16 20:57 ` ian
2008-11-17 4:50 ` Michael Albinus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=97F3A065-7FFD-4661-868F-5D9E8724A4E8@digg.com \
--to=ian@digg.com \
--cc=help-gnu-emacs@gnu.org \
--cc=kevin.d.rodgers@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).