From: Kevin Rodgers <kevin.d.rodgers@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Weird tramp scp permissions issue with
Date: Sat, 08 Nov 2008 13:43:50 -0700 [thread overview]
Message-ID: <gf4tm7$6mj$1@ger.gmane.org> (raw)
In-Reply-To: <8C288EF2-E676-4224-9202-37A88D9B60A3@digg.com>
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 ]
| default-file-modes is a built-in function in `C source code'.
| (default-file-modes)
|
| Return the default file protection for created files.
| The value is an integer.
|
| [back]
`----
,----[ C-h f set-default-file-modes RET ]
| set-default-file-modes is a built-in function in `C source code'.
| (set-default-file-modes mode)
|
| Set the file permission bits for newly created files.
| The argument mode should be an integer; only the low 9 bits are used.
| This setting is inherited by subprocesses.
|
| [back]
`----
For the familiar octal notation:
(format "%03o" (default-file-modes))
(set-default-file-modes ?\644)
--
Kevin Rodgers
Denver, Colorado, USA
next prev parent reply other threads:[~2008-11-08 20:43 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 [this message]
2008-11-08 21:05 ` Ian Eure
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='gf4tm7$6mj$1@ger.gmane.org' \
--to=kevin.d.rodgers@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.