wayneeseguin/rvm — Issue #751: System-wide install doesn't make directories group-writable
Author: nickhoffman
Created: 2012-02-11 06:43:07+00:00
State: open

**tl;dr** Many directories in _/usr/local/rvm/_ are not group-writable, which prevents other users from installing gems.

---

Hi guys. I just installed RVM system-wide on 2 different machines like this, as the user _nick_:
`$ sudo bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer )`

Next, I added the users _nick_ and _scout_ to the _rvm_ group, then logged-out and logged-in.

The user _nick_ is able to install gems. However, other users, such as _scout_, are unable to install gems. Here's what happens:

```
[nick@mongo02 ~] sudo -i -u scout
[scout@mongo02 ~]
[scout@mongo02 ~] gem install awesome_print
Fetching: awesome_print-1.0.2.gem (100%)
ERROR: While executing gem ... (Errno::EACCES)
Permission denied - /usr/local/rvm/gems/ruby-1.9.2-p290/cache/awesome_print-1.0.2.gem
[scout@mongo02 ~]
```

_/usr/local/rvm/gems/ruby-1.9.2-p290/cache/_ is owned by _nick_:_rvm_ , and isn't group-writable:

```
[nick@mongo02 ~] ls -ld /usr/local/rvm/gems/ruby-1.9.2-p290/cache/
drwxr-sr-x 2 nick rvm 4096 Feb 11 06:32 /usr/local/rvm/gems/ruby-1.9.2-p290/cache/
```

It turns out that a lot of directories in _/usr/local/rvm/_ are not group-writable:

```
[nick@mongo02 ~] find /usr/local/rvm/ -type d ! -perm +020 | wc -l
508
```