Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re: What is the best way to install CPAN modules on Debian?

by zakame (Monk)
on May 19, 2009 at 07:31 UTC ( #764860=note: print w/replies, xml ) Need Help??

in reply to What is the best way to install CPAN modules on Debian?

I noticed that the /usr/local hierarchy is group-owned by the `staff' user, so another approach that I'm trying now would be like this:

  1. Make (or add) a user belonging to the `staff' group.
  2. Ensure /usr/local/{share,lib}/perl/$VERSION is group-writeable by `staff'.
  3. Set up CPAN{,PLUS} to disable installing modules as root (even via sudo)
  4. Invoke CPAN{,PLUS} as the user above to install modules.

So far so good, I have successfully installed the Titanium bundle this way, with the only stumbling being updating the Test::Simple module (which I worked around by running perl Makefile.PL INSTALLDIRS=site). I imagine this may be the case for modules shipped in the Debian perl-base and perl-modules packages.

A side effect of this is that files of the newly-installed modules will be owned by that specific user in the `staff' group, which is great if you plan to keep you CPAN{,PLUS} installations managed by a single user.

edit: this is essentially option 2 above, except there's no need to make another `local_admin' group as there's a `staff' group already (designated in Debian as the group for junior sysadmins, see Securing Debian HOWTO)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://764860]
[marto]: yes
[Discipulus]: thanks i definetively must learn such stuff.. i must come out with a killing product and after i'll just do Perl elctronic and music.. ;=)
marto has a similar idea on the 'to do' list
[Discipulus]: 65-35 joint venture marto? ;=)

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (11)
As of 2017-10-17 09:57 GMT
Find Nodes?
    Voting Booth?
    My fridge is mostly full of:

    Results (225 votes). Check out past polls.