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

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

Re: Tramp: changing umask?


From: egarrulo
Subject: Re: Tramp: changing umask?
Date: Thu, 9 Jun 2016 10:47:19 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2

On 09/06/16 08:43, Michael Albinus wrote:
egarrulo <address@hidden> 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.


reply via email to

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