[Rd] R CMD INSTALL and file permission settings

Dirk Eddelbuettel edd at debian.org
Sat Jun 15 21:13:31 CEST 2013


On 15 June 2013 at 20:42, Martin Maechler wrote:
| >>>>> Dirk Eddelbuettel <edd at debian.org>
| >>>>>     on Sat, 15 Jun 2013 10:45:04 -0500 writes:
| 
|     > On 15 June 2013 at 07:00, Dirk Eddelbuettel wrote:
|     > | 
|     > | On 15 June 2013 at 07:47, Simon Urbanek wrote: | |
|     > Because update.packages() doesn't restore the
|     > group-writable bit. Which leads us to my point that this
|     > is not what you really want.
|     > | 
|     > | Ooops. I'll take another look.
| 
|     > Done.  "It works."  For fairly generous definitions of
|     > working. I'll detail:
| 
|     > i) My initial patch only used options() to set things.
|     > Martin was not to enthralled with this and guided the
|     > patch towards using --group-writable as an option.
| 
|     > ii) With --group-writable, installation works but updates
|     > fail as noticed by Simon.
| 
|     > iii) If we fall back to using options() [ or an
|     > environment variable ], things works.  A log is below.
| 
| Hmm, but this only works if everyone who calls  update.packages() also has
| this options() setting, no?

Exactly, which is why I like options() called from $R_HOME/etc/Rprofile.site
for all users.  Just how I add all (relevant) users to the relevant group.

This is meant for site-wide policy and site-wide once-and-for-all behaviour,
not having to tell all luser to please add --group-writable to their
invocations.  Because they will forget.

| Why would the update keep the package files group writable otherwise ?

Because we tell it to via options().

| I still think the approach to abolish all settings and just
| trigger group-writable package installation *when* the library
| directory is group writable is so simple we should adopt it,
| and can forget all options/ command line arguments / environment
| variables about this topic.

Maybe. I guess you would still need to match the gid for which the directory
is set to the gid of the user running the update.

Or you just use what we now and let the operating system handle this. It is
pretty good at it :)

Dirk

-- 
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com



More information about the R-devel mailing list