Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I setup a shared R package directory on a server?

Tags:

package

r

updates

I have a shared R package directory on a server in order to maintain consistent package versions for all users. This becomes problematic when someone attempts to install a new version of a package that another user originally installed, or they attempt to install it when that package is loaded elsewhere. In these instances R creates a 00LOCK-PackageName directory in the shared package directory, and the permissions are such that the installer doesn't have write access to many files within the directory. This then requires several people chmod-ind the directory to allow it to be deleted, or having one of our system administrators do the same.

This is an especially acute problem since we use R packages to maintain and deploy our reporting infrastructure. It's something that we're constantly updating and deploying to our shared server.

Are there settings or programs that facilitate shared R package management? Any general tips?

like image 690
Erik Shilts Avatar asked Mar 27 '12 21:03

Erik Shilts


Video Answer


1 Answers

One common solution is to

  • have everybody be a member of a common group, mayne rapps

  • have the directory where you share the R packages be group-owned by rapps, and you want to make that 'sticky' -- chmod g=rwt if I recall correctly

  • have your umask default set in /etc/profile or equivalent to make sure your default creation mode in in fact 'g+w'; I have used a file /etc/profile.d/local_umask.sh for this with a single command umask u=rwx,g=rwx,o=rx

like image 89
Dirk Eddelbuettel Avatar answered Oct 23 '22 09:10

Dirk Eddelbuettel