From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: egarrulo Newsgroups: gmane.emacs.help Subject: Re: Tramp: changing umask? Date: Thu, 9 Jun 2016 10:47:19 +0200 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1465462247 12355 80.91.229.3 (9 Jun 2016 08:50:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 9 Jun 2016 08:50:47 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jun 09 10:50:42 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bAvfm-0000fk-2n for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Jun 2016 10:50:42 +0200 Original-Received: from localhost ([::1]:33176 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAvfl-0002Ym-9S for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Jun 2016 04:50:41 -0400 Original-Path: usenet.stanford.edu!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 14 Original-X-Trace: individual.net jROg9CFLxmd6UF1AU4ENhguLKbVwuYYq2QPYmVKAYESCv471a3 Cancel-Lock: sha1:eLkbTFurBTNK3pb8JFqtFz5b1Hk= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 In-Reply-To: Original-Xref: usenet.stanford.edu gnu.emacs.help:218080 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:110389 Archived-At: On 09/06/16 08:43, Michael Albinus wrote: > egarrulo 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.