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

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

Re: Tramp: changing umask?


From: Michael Albinus
Subject: Re: Tramp: changing umask?
Date: Thu, 09 Jun 2016 08:43:47 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

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)))

Best regards, Michael.



reply via email to

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