I am trying to install R studio packages. I am running R as a "datacleaning" user this user
Some packages are installed from the local sources:
if (!require("SparseM", lib=lib.path)) install.packages("/dc/R/p1/SparseM_1.7.gz", repos = NULL, type="source", lib=lib.path)
The others directly from R cran
if (!require("stringr", lib=lib.path)) install.packages("stringr", lib=lib.path, repos=url.cran)
This is what the installation packages directory looks like:
drwxrwxr-x 7 root root 4096 feb 8 15:15 base64enc
drwxrwxr-x 8 datacleaning users 4096 feb 8 15:11 bit
drwxrwxr-x 9 root root 4096 feb 8 15:19 bit64
drwxrwxr-x 9 root root 4096 feb 8 15:16 data.table
drwxrwxr-x 6 root root 4096 feb 8 15:15 evaluate
drwxrwxr-x 9 root root 4096 feb 8 15:15 foreign
drwxrwxr-x 11 root root 4096 feb 8 15:16 gdata
drwxrwxr-x 8 root root 4096 feb 8 15:16 gtools
drwxrwxr-x 7 root root 4096 feb 8 15:15 highr
drwxrwxr-x 14 datacleaning users 4096 feb 8 15:15 knitr
drwxrwxr-x 7 root root 4096 feb 8 15:15 magrittr
drwxrwxr-x 11 root root 4096 feb 8 15:15 markdown
drwxrwxr-x 7 datacleaning users 4096 feb 8 15:11 mime
drwxrwxr-x 8 datacleaning users 4096 feb 8 15:16 plyr
drwxrwxr-x 16 datacleaning users 4096 feb 8 15:16 Rcpp
drwxrwxr-x 8 datacleaning users 4096 feb 8 15:16 reshape2
drwxrwxr-x 6 datacleaning users 4096 feb 8 15:15 sendmailR
drwxrwxr-x 8 datacleaning users 4096 feb 8 15:15 stringi
drwxrwxr-x 9 root root 4096 feb 8 15:15 stringr
drwxrwxr-x 8 datacleaning users 4096 feb 8 15:11 xtable
drwxrwxr-x 7 root root 4096 feb 8 15:15 yaml
Why is the installed package ownership becoming root? Some packages dependencies are trying to access those root packages. But then I am lacking of permission to access the root package.
Maybe I am missing something about R package installation