[Rd] R CMD INSTALL and file permission settings

Martin Maechler maechler at stat.math.ethz.ch
Fri Jun 14 22:04:34 CEST 2013

>>>>> Martin Maechler <maechler at stat.math.ethz.ch>
>>>>>     on Mon, 10 Jun 2013 11:44:57 +0200 writes:

>>>>> Dirk Eddelbuettel <edd at debian.org>
>>>>>     on Sat, 8 Jun 2013 11:22:56 -0500 writes:

    >> Summary:

    >> The directory /usr/local/lib/R/site-library can be used
    >> for site-wide multi-user installations of R.

    >> This is even the default on Debian and Ubuntu (following
    >> a suggestion by Kurt and Fritz a decade ago over beers --
    >> what could be better).  However, R enforces wrong
    >> permissions on directories and files there (removing
    >> group-write) which effectively defeats this purpose, and
    >> breaks multiuser installation: if Tom, Dick and Harry are
    >> members of group 'r-users', each one can install in the
    >> directory, but neither can _upgrade_ a package installed
    >> by one of the others.

    >> I would like to correct this.

    >> Details:

    > [..........]

    >> Proposal:

    >> Add a new option() [with a to-be-determined name] which,
    >> if enabled, turns on group-write modes for files and
    >> directories, ie "664" and "775".

    > [.........]

    >> I would be happy to write such a patch (including
    >> documentation updates) if someone from R Core can signal
    >> willigness to look at it.

    > "signal!"  :-)

In the mean time, Dirk has sent me a patch which I've Martinized
a tiny bit,
and committed now, both for R-devel and 'R 3.0.1 patched'.
The new feature is advertized as

      R CMD INSTALL --group-writable installs packages group writably,
      such that update.packages() works for other group members
      (suggested and from a patch by Dirk Eddelbuettel).

Wishing everyone a nice weekend,

Martin Maechler,
ETH Zurich

More information about the R-devel mailing list