unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: akater <nuclearspace@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: TRAMP and umask (and git)
Date: Sat, 07 Aug 2021 18:30:49 +0000	[thread overview]
Message-ID: <87mtptp0o6.fsf@gmail.com> (raw)

[-- 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 --]

             reply	other threads:[~2021-08-07 18:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-07 18:30 akater [this message]
2021-08-08 15:15 ` TRAMP and umask (and git) Michael Albinus
2021-08-08 16:23   ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-11 13:56   ` akater

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=87mtptp0o6.fsf@gmail.com \
    --to=nuclearspace@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).