From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: akater Newsgroups: gmane.emacs.help Subject: TRAMP and umask (and git) Date: Sat, 07 Aug 2021 18:30:49 +0000 Message-ID: <87mtptp0o6.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38176"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 07 20:42:32 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mCRHD-0009la-QY for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 07 Aug 2021 20:42:31 +0200 Original-Received: from localhost ([::1]:53042 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mCRHC-0008DO-FP for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 07 Aug 2021 14:42:30 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52224) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mCRGs-0008DA-VM for help-gnu-emacs@gnu.org; Sat, 07 Aug 2021 14:42:10 -0400 Original-Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]:33389) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mCRGr-0005A6-FM for help-gnu-emacs@gnu.org; Sat, 07 Aug 2021 14:42:10 -0400 Original-Received: by mail-wm1-x332.google.com with SMTP id m36-20020a05600c3b24b02902e67543e17aso902528wms.0 for ; Sat, 07 Aug 2021 11:42:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=/hzm9ylxNqeFFyKVzzk4tWRqGkkYK0hE39KrPjwFN5g=; b=SlOa/qt+NekD6qWkTaE/0siWDIb+PzunDEV8IQ3vylMOTlWvXnPSvQK2WpXfq7OeUl GCy7R1ABoPmIJUOfXkROZiwjXrLYrw3wsVX3gATBgD7yAvAMLHVXkiY0qH5zSniRf9IX isvhaN//WD4OVnJ12BmEV53CfOOGtE68Z7QWU5QxFdG1pk7vqZvqAYvpFgYpqG8Df6zI ZmelbkrYJQTi0w/Gz9LIvuikpe8EedtlnigV/dMOU1t6xGas9WWpfdRwg54Nkqm37842 /EN6bbww/jvf8nWZLPTLsbjoZm3sz35vvK0Q51mMJfiTRIxBTCi1VzNws5udhvpv6FPG r+pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=/hzm9ylxNqeFFyKVzzk4tWRqGkkYK0hE39KrPjwFN5g=; b=BJFCWtAOgFQb+XSZFhGsBXPEjrTXRja3HP4NcHdRIHWGmuRQT91DaOa0C23frDD5wN RFAIZt6ay/wWBEPouAUXuZO3P+tjZqHngNQEy950rd1WMSpWaeSatsZzWyqUsmm1CQLb RFSkhIFVmt3zTi59/4C1pQH8XFp3S9pJCC1A9Mk4X7108TDp2wP6keoT5JFKqV3quTDa 7MLjXkWIK2ZtUFCKstYUkbeEMm9WRgEB9b+2S76r6ImaJ4qJvEo8TPcqRFhS2lbneU4+ eSpWK0wZkMoY/I97Cp2mapjFIZABWnwW+unC94SgFPJY0g9eNw5V7mLFS6lwxbBszP57 AeSQ== X-Gm-Message-State: AOAM5322Y2JknC2B5b5KDp3zeGgHC4PbQP8AjEvEIAaqDUx3eIuE6n1c HCH5fncHxfr3Z5vQZwBQZPc7Sk3maziJI0Xr X-Google-Smtp-Source: ABdhPJw3Huws6U1Bg5nEp5u+6Mc6DJ5Ngk4vZqCznnQSdZpaqAX++2y6CE0/t1YHa818ZB9Ecl63Gw== X-Received: by 2002:a7b:c213:: with SMTP id x19mr25906752wmi.186.1628361727590; Sat, 07 Aug 2021 11:42:07 -0700 (PDT) Original-Received: from localhost (tor-exit-2.zbau.f3netze.de. [185.220.100.253]) by smtp.googlemail.com with ESMTPSA id k9sm13241670wrc.6.2021.08.07.11.42.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Aug 2021 11:42:06 -0700 (PDT) Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=nuclearspace@gmail.com; helo=mail-wm1-x332.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:132394 Archived-At: --=-=-= Content-Type: text/plain 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? --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJLBAEBCgA1FiEEgu5SJRdnQOF34djNsr6xYbHsf0QFAmEO0VsXHG51Y2xlYXJz cGFjZUBnbWFpbC5jb20ACgkQsr6xYbHsf0QHQw//d+XLH800T7aImtAbFUxGunxM CMrqPf6OjzgyEUkvPg9T5h9UafTO+t1LOMsfYhhkQaFQ0a18Dq4nE8i8yuV59toD duD3EqXYF1kaTuV30rpJKnuV8qmyJRHFZ9MzM8UltyrpapAVpMKltu2oz1U/XgRe rgj5fSj7ZJ/HHuglNBY48wLG/AkMy+fqhSOxozxM3P/4v2tMYjusqyvgiY7DeClM 2A+qNKkg+Cmud6sOPXrPG9MWdp5U8JlQahQDdZ675WCPRRihEds+Fsw/zs3hhKfu dp4PcE4kCAVTWrgbOihbSfp1sXnwZC7kZD1PCdqvMDjYHy0UqmP4qMBcoZA/jJxS Ib0Z7pkgSMR2ZrByrHpKNjaqpS5exCLELSR9FPqv890EmjLfR2C9r9jWORWJGIRK 8oAwrKoxatKUDTIj2IdW3FL3dk0Vsvbw+gY+oceR1AkMdyvFgptm7o+LUIYqCKXu WnFDRo6O9zHYGUxCFuxiBYrTYdDkJrbxMsF0B3qpqjnFjCWa5ill8Ii3gGT8vCMQ G9NJVIustjYmR7HpAKIHIugiZoDuOZLAua1KDbuVry40PZMF8tncJfy6vV20Yxra CCN++NTu0fd8JJpprBiXf4Vjkz7Jk67NLvxXZZPX6XI3AbehBqeX6YomBo6qiZf5 1Y2TEadH39084uNkghs= =Wc0x -----END PGP SIGNATURE----- --=-=-=--