[Rd] Option to set permissions on directories and files after package installation

From: Dirk Eddelbuettel <edd_at_debian.org>
Date: Sun, 25 Nov 2012 15:57:44 -0600

The R package on Debian (and hence Ubuntu) has had a default for close to a decade to install into /usr/local/R/site-library/. This came from a suggestion by Kurt and Fritz, and I still think of it as rather useful.

To me, this suggests multiuser mode, preferably without sudo. One can get close via group membership on the directory, but ultimate this always fails because tools:::.install_packages() insists on putting 0644 / 0755 modes on everything as seen from the following selection from that function:

                ## not clear if this is still necessary, but sh version did so
                if (!WINDOWS) Sys.chmod(file.path(dest, files), "755")


                if (file.exists(f)) {
                    file.copy(f, instdir, TRUE)
                    Sys.chmod(file.path(instdir, f), "644")
                }


		Sys.chmod(Sys.glob(file.path(instdir, "data", "*")), "644")


	    Sys.chmod(Sys.glob(file.path(instdir, "demo", "*")), "644")


                    Sys.chmod(Sys.glob(file.path(instdir, "exec", "*")), "755")


                Sys.chmod(i2_files[execs], "755")


I would like to have the option of haveing the effect of setting umask 0002 so that people in my group can replace packages. The simplest may be to replace "644"/"755" with "664"/"775" is a suitable option is set. More involved schemes are of course possible too.

Naturally, I would be happy to work on patch if there was any indication that the patch would be reviewed and possibly included.

With that: comments, please. Is this seen as sensible or deemed nutty and off-limits?

Thanks, Dirk

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

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Sun 25 Nov 2012 - 22:01:50 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 26 Nov 2012 - 10:41:29 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive