This came up as a permission issue on Ubuntu 16.04. I was unable to remove some R libraries installed in /usr/local/lib/R/site-library
. It turned out that I did not have permission. The directory was owned by root
and the group was staff
.
I temporarily resolved the permission issue by manually adding my user to the staff
group.
sudo usermod -a -G staff myusername
# *see blockquote before using this!*
That allows me to remove the libraries from IDE.
However, when I tried to look up more information on staff group and was not able to find any definite material on the topic. Not even what the group was primarily intended for. I could only guess it is used to give similar 'enhanced' access to users on certain directories.
Are there any implications of manually adding a user to the staff group?
As an aside, is there any command to know the system-wide permissions for a group? For instance, what all are the directories for which group staff will have write permission?
Thanks.
Edit: I must add here that using
adduser
instead ofusermod
is a much more sensible option for this operation [please see the comment below]
sudo adduser myusername staff
sudo find / -type d -group staff -perm -g=w
(not counting permissions set by ACLs)/usr/share/doc/base-passwd/users-and-groups.txt.gz
, but I don't an Ubuntu system on hand to check. And it's easier to useadduser
for adding to a group:sudo adduser myusername staff
, less chances of screwing up if you forget-a
./usr/share/doc/base-passwd/users-and-groups.html
has much of the information I was looking for. If noone else chips in with anything significantly informative, I'd be happy to accept it as an answer. That might need some embellishment for sake of future readers though, I reckon.find
, I'd already done that and dumped to a log. Will need some parsing and pruning to make sense of it. Was wondering if there was a utility specifically for that. Setting-maxdepth 2
shows whole of/local/
is owned by staff.