wayneeseguin/rvm — Issue #657: rvm wrong to restore the umask value
Author: sunteya
Created: 2011-12-25 05:18:32+00:00
State: open

I use root install rvm 1.10.0 on ubuntu server 11.10.

and, my `/etc/profile`. I append umask g+w at last.

```
# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).

if [ -d /etc/profile.d ]; then
for i in /etc/profile.d/*.sh; do
if [ -r $i ]; then
. $i
fi
done
unset i
fi

if [ "$BASH" ]; then
[ -f /etc/bash.bashrc ] && . /etc/bash.bashrc
fi

umask g+w
```

after login, typing

```
Last login: Sun Dec 25 12:56:53 2011 from 1337air
root@ubuntu1110:~# umask
0002
root@ubuntu1110:~# cd /
root@ubuntu1110:/# umask
0022
root@ubuntu1110:/#
```

because the `/etc/profile.d/rvm.sh` stored umask before `/etc/profile` umask line.
similarly, if I change umask on `~/.profile` still same problem.