[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sudo make install
From: |
Michael Heerdegen |
Subject: |
Re: sudo make install |
Date: |
Sun, 19 Apr 2015 15:33:26 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
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.
- Re: sudo make install, (continued)
- Re: sudo make install, Stefan Monnier, 2015/04/14
- Re: sudo make install, Bob Proulx, 2015/04/16
- Re: sudo make install, Michael Heerdegen, 2015/04/16
- Re: sudo make install, Bob Proulx, 2015/04/16
- Re: sudo make install, Michael Heerdegen, 2015/04/17
- Re: sudo make install, Bob Proulx, 2015/04/18
- Re: sudo make install,
Michael Heerdegen <=
- Re: sudo make install, Bob Proulx, 2015/04/19
- Re: sudo make install, Michael Heerdegen, 2015/04/20
- Re: sudo make install, Bob Proulx, 2015/04/20