How can multiple developers build/install/update packages on RStudio server on Linux? I think it has to do with groups and we had it working once, but some update stopped that, but now we are getting the 00LOCK errors all the time.

General Problem

Sometime in 2020 an update caused sharing packages to be a pain and the 00LOCK error has begun to appear everywhere. We used to build or install packages as part of the shared 'staff' group, but not anymore.
How can I build a package so that the owner is part of a shared linux group?
How can I update the root package?

The Error

I'm fairly sure this error is from the fact that this package belongs to USER2 and I am USER1.
We used to be able to download packages as the STAFF unix group we both belong to.

* installing *source* package ‘RJSONIO’ ...
** package ‘RJSONIO’ successfully unpacked and MD5 sums checked
mv: cannot move '/usr/local/lib/R/site-library/RJSONIO' to '/usr/local/lib/R/site-library/00LOCK-RJSONIO/RJSONIO': Permission denied
ERROR: cannot remove earlier installation, is it in use?
* removing ‘/usr/local/lib/R/site-library/RJSONIO’

Linux Permission Info

I checked the packages and all of the permissions look like this.
Both user1 and user2 belong to staff.
The shared library is "/usr/local/lib/R/site-library"

drwxrwxr-x 10 root  root     4096 Jan  7  2021 pkg1
drwxrwxr-x 10 root  staff    4096 Jan  7  2019 pkg2
drwxrwxr-x  6 user1 user1    4096 Nov  7  2019 pkg3
drwxrwxr-x  6 user2 user2    4096 Nov  7  2019 pkg4

Additional Observations

  • I can delete and update the root/staff packages and user1/user1 packages.
  • Reinstalling those root/staff packages makes them user1/user1 packages.
  • I can't do anything to the root/root packages or user2/user2 packages.
  • looking at the dates I can tell all the root/staff packages are 2020/2019
  • I think a config file went missing or default changes when upgrading to R 4.0.

Nuclear Option

We could of course just delete the library using sudo and rebuild, but doing that all the time is a bit overkill.
How exactly can we collaborate with a shared library without locking each other out of packages we happened to install first.

Solution:

It was a basic unix issue.
USER1 and USER2 needed to set the default group to the same thing with shared permissions.
The default group was USER1/USER2 respectively and when we switched to TEAM/TEAM it worked.

The group default was changed according to the link below.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.