[Rd] R CMD INSTALL and file permission settings

Andreas Leha andreas.leha at med.uni-goettingen.de
Fri Jun 14 23:13:11 CEST 2013


Simon Urbanek <simon.urbanek at r-project.org> writes:

> On Jun 14, 2013, at 4:35 PM, Dirk Eddelbuettel wrote:
>
>> 
>> On 14 June 2013 at 16:17, Simon Urbanek wrote:
>> | 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.
>> 
>> One could also consider respecting the umask which is ignored in the
>> older behaviour, ignore in what was just committed, and ignored in what you
>> suggest here.  Not exactly right either.
>> 
>
> Agreed.
>
>
>> But up until right now I could not update a package a colleague installed,
>> and vice versa -- unless we sudo.  
>> 
>
> But you should be able to simply removing it, and re-installing,
> right? (This is not to suggest it as a work-around, but rather to make
> sure we're taking about the same situation).
>

I am not sure I understand this correctly.  But I don't see how 'rm -rf'
would be possible without sudo:
$ ls -l /usr/local/lib/R/site-library/ | tail -n 1
drwxr-xr-x 12 aleha staff 4096 Apr  7  2012 XML

Here, the user aleha installed XML into /usr/local/lib/R/site-library and
no other user (not even in the same group) has write access to that
package's directory.  So, neither update nor removal is possible.  Am I
missing the point?

[...]

Regards,
Andreas



More information about the R-devel mailing list