[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-stow] Installing without root privileges in /usr/local

From: Adam Spiers
Subject: Re: [Help-stow] Installing without root privileges in /usr/local
Date: Tue, 6 Mar 2012 22:49:27 +0000

Hi there,

On Tue, Mar 6, 2012 at 8:28 PM, enclair <address@hidden> wrote:
> I'd like to use stow this way, but I wonder if there are any drawbacks, or
> if there is a better way:
> /usr/local/stow belongs to a non-root user.
> Then, to install a package I could do:
> $ ./configure --prefix=/usr/local/stow/package
> $ make
> $ make install
> And as root:
> # cd /usr/local/stow
> # stow package
> What do you think?

That should work fine, as per

although you should be aware that this potentially reduces the
security of the whole system to that of the user with access to
/usr/local/stow.  If that user's account was compromised, and there
was an existing symlink from /usr/local/bin/foo to
/usr/local/stow/package/bin/foo, then the intruder would only need to
replace the latter with a trojaned version and wait for it to be run
in order to gain root access.

Having said that, most people probably blindly trust the sources and
compile as root, which is also risky.  By compiling non-root, you are
avoiding giving untrusted sources root privileges at compile-time,
which is obviously a good thing.

If you wanted to be more paranoid, you could create a 'stow' user
specially for compiling and owning stow packages, and ensure that this
user has very limited privileges and cannot be attacked via any
external-facing services.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]