Hello, I've been trying to setup a site library that allows the users to manage the R packages themselves, but am having an issue with permissions. As seen below, when installing a package using install.packages, the umask used is always 022. Instead, I would like it to be 002, allowing any user to update packages that were installed by another user. Can someone explain how to get install.packages to respect the Sys.umask setting or another way to ensure that any user can update any package?
Background information: OS: CentOS release 6.2 (Final) Kernel: Linux 2.6.32-220.el6.i686 #1 SMP i686 i386 GNU/Linux R was installed via R package on EPEL: http://dl.fedoraproject.org/pub/epel/6/i386/R-2.15.1-1.el6.i686.rpm Additonal configuration: $ echo 'R_LIBS_SITE="/usr/lib/R/site-library:"${R_LIBS_SITE}' > /usr/lib/R/etc/Renviron.site $ mkdir /usr/lib/R/site-library $ chmod 775 /usr/lib/R/site-library $ chgrp users /usr/lib/R/site-library/ Example: [user1@new-host-3 ~]$ ls -lah /usr/lib/R/site-library/ total 8.0K drwxrwxr-x. 2 root users 4.0K Aug 16 22:08 . drwxr-xr-x. 8 root root 4.0K Aug 16 22:08 .. [user1@new-host-3 ~]$ R R version 2.15.1 (2012-06-22) -- "Roasted Marshmallows" Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i686-redhat-linux-gnu (32-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. Natural language support but running in an English locale R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > Sys.umask() [1] "22" > Sys.umask("2") > Sys.umask() [1] "2" > install.packages("combinat") Installing package(s) into /usr/lib/R/site-library (as lib is unspecified) --- Please select a CRAN mirror for use in this session --- CRAN mirror 1: Argentina (La Plata) 2: Argentina (Mendoza) 3: Australia (Canberra) 4: Australia (Melbourne) 5: Austria 6: Belgium 7: Brazil (PR) 8: Brazil (RJ) 9: Brazil (SP 1) 10: Brazil (SP 2) 11: Canada (BC) 12: Canada (NS) 13: Canada (ON) 14: Canada (QC 1) 15: Canada (QC 2) 16: Chile 17: China (Beijing 1) 18: China (Beijing 2) 19: China (Beijing 3) 20: China (Guangzhou) 21: China (Hefei) 22: China (Xiamen) 23: Colombia (Bogota) 24: Colombia (Cali) 25: Denmark 26: Ecuador 27: France (Toulouse) 28: France (Lyon 1) 29: France (Lyon 2) 30: Germany (Berlin) 31: Germany (Goettingen) 32: Germany (Wiesbaden) 33: Greece 34: India 35: Indonesia 36: Iran 37: Ireland 38: Italy (Milano) 39: Italy (Padua) 40: Italy (Palermo) 41: Japan (Hyogo) 42: Japan (Tsukuba) 43: Japan (Tokyo) 44: Korea 45: Latvia 46: Mexico (Mexico City) 47: Mexico (Texcoco) 48: Netherlands (Amsterdam) 49: Netherlands (Utrecht) 50: New Zealand 51: Norway 52: Philippines 53: Poland (Oswiecim) 54: Poland (Wroclaw) 55: Russia 56: Singapore 57: Slovakia 58: South Africa 59: Spain (Madrid) 60: Sweden 61: Switzerland 62: Taiwan (Taichung) 63: Taiwan (Taipei) 64: Thailand 65: UK (Bristol) 66: UK (London) 67: UK (St Andrews) 68: USA (CA 1) 69: USA (CA 2) 70: USA (IA) 71: USA (IN) 72: USA (KS) 73: USA (MD) 74: USA (MI) 75: USA (MO) 76: USA (OH) 77: USA (OR) 78: USA (PA 1) 79: USA (PA 2) 80: USA (TN) 81: USA (TX 1) 82: USA (TX 2) 83: USA (WA 1) 84: USA (WA 2) 85: Venezuela 86: Vietnam Selection: 78 trying URL 'http://lib.stat.cmu.edu/R/CRAN/src/contrib/combinat_0.0-8.tar.gz' Content type 'application/x-gzip' length 7973 bytes opened URL ================================================== downloaded 7973 bytes * installing *source* package combinat ... ** Creating default NAMESPACE file ** R ** preparing package for lazy loading ** help *** installing help indices converting help for package combinat finding HTML links ... done combn html dmnom html hcube html nsimplex html permn html rmultinomial html x2u html xsimplex html ** building package indices ** testing if installed package can be loaded * DONE (combinat) The downloaded source packages are in /tmp/RtmpYRQ6Gh/downloaded_packages > quit() Save workspace image? [y/n/c]: n [user1@new-host-3 ~]$ ls -lah /usr/lib/R/site-library/ total 12K drwxrwxr-x. 3 root users 4.0K Aug 16 22:11 . drwxr-xr-x. 8 root root 4.0K Aug 16 22:08 .. drwxr-xr-x. 6 user1 users 4.0K Aug 16 22:11 combinat Thank you, Daniel ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.