[Rd] R CMD INSTALL and file permission settings

Simon Urbanek simon.urbanek at r-project.org
Fri Jun 14 22:17:51 CEST 2013


On Jun 14, 2013, at 4:04 PM, Martin Maechler wrote:

>>>>>> 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,
> 

I think it would be better to have a bit more sane handling of this. The decision is rarely at the install time of the package -- e.g. did you adjust the flag for INSTALL in update.packages based on the permissions? Otherwise it fails the next time and confuses the hell out of users! Although it's certainly a step up from the previously hard-coded default, I would argue that the most desired behavior is to follow the permissions already set up. If the library is setup to be group-writable then the package should be installed group-writable. The point is that anything else makes less sense - the user can still use rm -rf and re-install it even if the package is not writable. It's just update.packages() that fails.

Cheers,
Simon



> Martin Maechler,
> ETH Zurich
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
> 
> 



More information about the R-devel mailing list