rvm / rvm1-ansible

The official ansible RVM role to install and manage your Ruby versions.
MIT License
271 stars 136 forks source link

Permission issue after installation #126

Closed thbar closed 7 years ago

thbar commented 7 years ago

I'm facing a puzzling situation where in Vagrant, the RVM setup goes just fine, while on a production server with the same distribution/release, I get the following permission error (I'm using rvm1-ansible v2.2.0, but also tested with v1.3.9 in single user mode):

TASK [rvm_io.ruby : Install rvm] ***********************************************
changed: [REDACTED-HOST] => {"changed": true, "cmd": ["/tmp/rvm-installer.sh", "stable", "--path", "/home/REDACTED/.rvm", "--auto-dotfiles", "--user-install"], "delta": "0:00:06.991160", "end": "2016-11-30 23:59:21.893134", "rc": 0, "start": "2016-11-30 23:59:14.901974", "stderr": "gpg: Signature made mar. 29 mars 2016 15:49:47 CEST using RSA key ID BF04FF17\ngpg: Good signature from \"Michal Papis (RVM signing) <mpapis@gmail.com>\"\ngpg: WARNING: This key is not certified with a trusted signature!\ngpg:          There is no indication that the signature belongs to the owner.\nPrimary key fingerprint: 409B 6B17 96C2 7546 2A17  0311 3804 BB82 D39D C0E3\n     Subkey fingerprint: 62C9 E5F4 DA30 0D94 AC36  166B E206 C29F BF04 FF17\nIn case of problems: https://rvm.io/help and https://twitter.com/rvm_io", "stdout": "Turning on auto dotfiles mode.\nTurning on user install mode.\nDownloading https://github.com/rvm/rvm/archive/1.27.0.tar.gz\nDownloading https://github.com/rvm/rvm/releases/download/1.27.0/1.27.0.tar.gz.asc\nGPG verified '/home/REDACTED/.rvm/archives/rvm-1.27.0.tgz'\n\nInstalling RVM to /home/REDACTED/.rvm/\n    Adding rvm PATH line to /home/REDACTED/.profile /home/REDACTED/.mkshrc /home/REDACTED/.bashrc /home/REDACTED/.zshrc.\n    Adding rvm loading line to /home/REDACTED/.profile /home/REDACTED/.bash_profile /home/REDACTED/.zlogin.\nInstallation of RVM in /home/REDACTED/.rvm/ is almost complete:\n\n  * To start using RVM you need to run `source /home/REDACTED/.rvm/scripts/rvm`\n    in all your open shell windows, in rare cases you need to reopen all shell windows.\n\n# deploy,\n#\n#   Thank you for using RVM!\n#   We sincerely hope that RVM helps to make your life easier and more enjoyable!!!\n#\n# ~Wayne, Michal & team.", "stdout_lines": ["Turning on auto dotfiles mode.", "Turning on user install mode.", "Downloading https://github.com/rvm/rvm/archive/1.27.0.tar.gz", "Downloading https://github.com/rvm/rvm/releases/download/1.27.0/1.27.0.tar.gz.asc", "GPG verified '/home/REDACTED/.rvm/archives/rvm-1.27.0.tgz'", "", "Installing RVM to /home/REDACTED/.rvm/", "    Adding rvm PATH line to /home/REDACTED/.profile /home/REDACTED/.mkshrc /home/REDACTED/.bashrc /home/REDACTED/.zshrc.", "    Adding rvm loading line to /home/REDACTED/.profile /home/REDACTED/.bash_profile /home/REDACTED/.zlogin.", "Installation of RVM in /home/REDACTED/.rvm/ is almost complete:", "", "  * To start using RVM you need to run `source /home/REDACTED/.rvm/scripts/rvm`", "    in all your open shell windows, in rare cases you need to reopen all shell windows.", "", "# deploy,", "#", "#   Thank you for using RVM!", "#   We sincerely hope that RVM helps to make your life easier and more enjoyable!!!", "#", "# ~Wayne, Michal & team."], "warnings": []}

TASK [rvm_io.ruby : Update rvm] ************************************************
skipping: [REDACTED-HOST] => {"changed": false, "skip_reason": "Conditional check failed", "skipped": true}

TASK [rvm_io.ruby : Configure rvm] *********************************************
fatal: [REDACTED-HOST]: FAILED! => {"changed": false, "cmd": "/home/REDACTED/.rvm/bin/rvm autolibs read-fail", "failed": true, "msg": "[Errno 13] Permission denied", "rc": 13}

I've temporarily lost access to the server I was deploying to (unrelated), but seem to remember that the files under ~/.rvm/scripts (such as version, list) did not have the execution bit set, while in my Vagrant setup I can see that most files there are executable.

I'll investigate again once I get access back to the server, but thought I'd report that since it's fairly weird & blocking.

thbar commented 7 years ago

Got access back to the server, and I can confirm that files under /home/myuser/.rvm/scripts do not have the execute bit set (unlike in Vagrant, or even on my local Mac).

I have no idea what is happening at this stage.

thbar commented 7 years ago

After more tests and an attempt to install manually using \curl -sSL https://get.rvm.io | bash -s stable, I see the same problem. This probably means my issue is not related to rvm1-ansible.

I'll investigate more and will come back (probably to close here).

thbar commented 7 years ago

Moving there https://github.com/rvm/rvm/issues/3832. Closing.