unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: egarrulo <egarrulo@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Tramp: changing umask?
Date: Thu, 9 Jun 2016 10:47:19 +0200	[thread overview]
Message-ID: <drsoonFqkumU1@mid.individual.net> (raw)
In-Reply-To: <mailman.1187.1465454639.1216.help-gnu-emacs@gnu.org>

On 09/06/16 08:43, Michael Albinus wrote:
> egarrulo <egarrulo@gmail.com> writes:
>
>> I have found that I can run "chmod 0644" on files, therefore
>> if there were a way to run this command after saving a file via Tramp,
>> that would could be a way to solve the problem, I think.
>
> There is `tramp-handle-write-region-hook'. Here you can add any function
> you want to be executed after writing a file remotely. Like this:
>
> (add-hook 'tramp-handle-write-region-hook
>            (lambda () (set-file-modes (buffer-file-name) #o644)))

This fix worked.  Thanks.


      parent reply	other threads:[~2016-06-09  8:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-08  9:28 Tramp: creating new files with 0644 permissions rather than 0664? egarrulo
2016-06-08  9:32 ` egarrulo
2016-06-08 15:20 ` Barry Margolin
2016-06-08 19:37   ` Tramp: changing umask? egarrulo
2016-06-08 20:33     ` Barry Margolin
2016-06-08 21:55     ` egarrulo
2016-06-08 22:21       ` Nick Dokos
     [not found]       ` <mailman.1173.1465424514.1216.help-gnu-emacs@gnu.org>
2016-06-08 22:44         ` egarrulo
2016-06-09  6:43           ` Michael Albinus
     [not found]           ` <mailman.1187.1465454639.1216.help-gnu-emacs@gnu.org>
2016-06-09  8:47             ` egarrulo [this message]

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=drsoonFqkumU1@mid.individual.net \
    --to=egarrulo@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.
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).