help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Weird tramp scp permissions issue with


From: Kevin Rodgers
Subject: Re: Weird tramp scp permissions issue with
Date: Sat, 08 Nov 2008 13:43:50 -0700
User-agent: Thunderbird 2.0.0.17 (Macintosh/20080914)

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]