[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: TRAMP and umask (and git)
From: |
Emanuel Berg |
Subject: |
Re: TRAMP and umask (and git) |
Date: |
Sun, 08 Aug 2021 18:23:44 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Michael Albinus wrote:
>> 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.
>
> sudo requires an additional "-i" argument in order to to run
> the shell as login shell, reading ~/.profile. So you must
> teach the "sudo" entry in tramp-methods to add this
> argument, via tramp-login-args.
>
> Furthermore, if x's remote shell is bash or zsh, Tramp tries
> to avoid reading ~/.profile. See tramp-sh-extra-args.
Tramp... zsh... this rings a bell. No, actually the bell rings
clear, it was rather that when we finally got it to work, we
had tried so many things conclusions were... inconclusive
at best.
I don't even remember if it was indeed zsh, or my remote SunOS
and OpenBSD, that caused the trouble. They are trouble spot
OSs, right?
Anyway I yank the file, maybe Mr. Albinus can have a second
look and detect what was going on :) Maybe it can help the OP
as well.
Anyway it works great, thanks again :) "Hooray!"
;;; -*- lexical-binding: t -*-
;;;
;;; this file:
;;; http://user.it.uu.se/~embe8573/emacs-init/tramp-incal.el
;;; https://dataswamp.org/~incal/emacs-init/tramp-incal.el
(require 'tramp)
(setq tramp-histfile-override nil)
(add-to-list 'tramp-methods
'("sunos-ssh"
(tramp-login-program "ssh")
(tramp-login-args (("-l" "%u")
("-p" "%p")
("%c")
("-e" "none")
("-t" "-t")
("%h")
("\"/bin/sh -i\"") ))
(tramp-async-args (("-q")))
(tramp-remote-shell "/bin/sh")
(tramp-remote-shell-login ("-l"))
(tramp-remote-shell-args ("-c"))
))
;; SunOS system:
;; (find-file "/sunos-ssh:embe8573@polhem.it.uu.se:public_html/darn.txt")
;;
;; OpenBSD system:
;; (find-file "/-:incal@srv.dataswamp.org:public_html/bot/sth.py")
--
underground experts united
https://dataswamp.org/~incal