all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: help-gnu-emacs@gnu.org
Subject: Re: sudo make install
Date: Sun, 19 Apr 2015 15:33:26 +0200	[thread overview]
Message-ID: <87twwc8cpl.fsf@web.de> (raw)
In-Reply-To: <20150418130152206309092@bob.proulx.com> (Bob Proulx's message of "Sat, 18 Apr 2015 13:32:21 -0600")

Hi Bob,

> Again, if you are a solo individual working on your own laptop or
> whatever then umask doesn't matter.  If you are in group 'staff' then
> you would be able to 'make install' and write the files to /usr/local
> without root (without sudo, without su) and the files could be written
> using a more restrictive 022 umask.  The umask strategy above only
> comes into play when there are multiple users needing to share a
> working area.

thanks again for your explanations.

I think I got it right - but got confused by the octal notation of the
umask and the optional leading zero.  I didn't find any explanation of
how the umask is interpreted for different numbers of digits.  I tried
"umask 0002", and saw from the umask -S output that it was what I
wanted.

I also understood the role of the sticky bit set for "/usr/share": it
causes the files I created there to be group owned by "staff" even when
it is not my primary group.

But after all, it doesn't work as expected.  When I do "make
install", even with the correct umask in effect, installed stuff in
/usr/local is not group writable.  Looking at the output of "make
install", "make" seems to set the umask explicitly itself:

--8<---------------cut here---------------start------------->8---
[...]
Installing utilities for users to run.
umask 022 && /bin/mkdir -p "/usr/local/bin"
for file in etags ctags emacsclient  ebrowse ; do \
  /usr/bin/install -c  ${file} \
    "/usr/local/bin"/` \
      echo ${file} | sed -e 's/$//' -e 's,x,x,' \
    ` || exit; \
done
make[1]: Leaving directory '/home/micha/software/emacs/lib-src'
if test "no" = "no"; then \
  /usr/bin/install -c  src/emacs "/usr/local/bin/`echo emacs-25.0.50 | sed 's,x,x,'`" || exit 1 ; \
  chmod 1755 "/usr/local/bin/`echo emacs-25.0.50 | sed 's,x,x,'`" || true; \
  if test "x" = x; then \
    rm -f "/usr/local/bin/`echo emacs | sed 's,x,x,'`" ; \
    cd "/usr/local/bin" && ln -s `echo emacs-25.0.50 | sed 's,x,x,'` `echo emacs | sed 's,x,x,'`; \
  fi;
[...]
--8<---------------cut here---------------end--------------->8---

This prevents me from getting the result you suggested.


Thanks,

Michael.



  reply	other threads:[~2015-04-19 13:33 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-14 19:46 sudo make install Michael Heerdegen
2015-04-14 19:56 ` Milan Stanojević
2015-04-14 20:06   ` Ludwig, Mark
2015-04-14 20:16     ` Michael Heerdegen
2015-04-14 20:15   ` Michael Heerdegen
2015-04-14 20:25     ` Milan Stanojević
2015-04-15  1:05 ` Stefan Monnier
2015-04-15 10:15   ` Martin
2015-04-15 10:25   ` Michael Heerdegen
2015-04-15 10:55     ` tomas
2015-04-15 12:41     ` Stefan Monnier
2015-04-15 21:26 ` Bob Proulx
2015-04-16 11:01   ` Michael Heerdegen
2015-04-16 21:04     ` Bob Proulx
2015-04-17 15:07       ` Michael Heerdegen
2015-04-18 19:32         ` Bob Proulx
2015-04-19 13:33           ` Michael Heerdegen [this message]
2015-04-20  0:31             ` Bob Proulx
2015-04-20 14:57               ` Michael Heerdegen
2015-04-20 17:31                 ` Bob Proulx

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87twwc8cpl.fsf@web.de \
    --to=michael_heerdegen@web.de \
    --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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.