unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* TRAMP and umask (and git)
@ 2021-08-07 18:30 akater
  2021-08-08 15:15 ` Michael Albinus
  0 siblings, 1 reply; 4+ messages in thread
From: akater @ 2021-08-07 18:30 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 977 bytes --]

I work with a git repository via TRAMP (and magit, but that doesn't seem
to be important).  Repository's owner is user x, and x's umask is 022.
All operations on the repository are done via /sudo:x@.../ My umask,
however, is 077.  I can't make Emacs use a umask that would be
appropriate to the context.  It seems to always use a global umask.

I searched the mailing list, found this thread
https://lists.gnu.org/archive/html/help-gnu-emacs/2016-06/msg00214.html
It resolves with the recommendation to use
tramp-handle-write-region-hook.  With git repository, this won't help as
operations are performed by git.  E.g. a rebase messes up everything.

There is another suggestion there that recommends to alter x's .profile
and set umask depending on a value passed via
tramp-remote-process-environment.  I just altered x's .profile to set
umask *unconditionally*, and it has no effect.  So far, the way Tramp
treats umask makes absolutely no sense to me.

What are my options?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 865 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-09-11 13:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-07 18:30 TRAMP and umask (and git) akater
2021-08-08 15:15 ` Michael Albinus
2021-08-08 16:23   ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-11 13:56   ` akater

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