Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

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

by zakame (Pilgrim)
on May 19, 2009 at 07:31 UTC ( [id://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?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://764860]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2024-04-26 08:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found