Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mkdir: /etc/openssl: Permission denied #3103

Closed
behrangsa opened this issue Oct 25, 2014 · 3 comments
Closed

mkdir: /etc/openssl: Permission denied #3103

behrangsa opened this issue Oct 25, 2014 · 3 comments

Comments

@behrangsa
Copy link

While installing Ruby 2.1.3 on Yosemite, a permission denied error happens near the end of installation:

~ username$ rvm install 2.1.3
Searching for binary rubies, this might take some time.
Found remote file https://rvm.io/binaries/osx/10.10/x86_64/ruby-2.1.3.tar.bz2
Checking requirements for osx.
Installing requirements for osx.
Updating system..username password required for 'port -dv selfupdate': 
...................................................................................................
Installing required packages: libyaml, readline, libksba.........
Updating certificates in '/opt/local/etc/openssl/cert.pem'.
Requirements installation successful.
ruby-2.1.3 - #configure
ruby-2.1.3 - #download
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 6910k  100 6910k    0     0  1321k      0  0:00:05  0:00:05 --:--:-- 1472k
ruby-2.1.3 - #validate archive
ruby-2.1.3 - #extract
ruby-2.1.3 - #validate binary
ruby-2.1.3 - #setup
ruby-2.1.3 - #gemset created /Users/username/.rvm/gems/ruby-2.1.3@global
ruby-2.1.3 - #importing gemset /Users/username/.rvm/gemsets/global.gems....................................
ruby-2.1.3 - #generating global wrappers........
ruby-2.1.3 - #gemset created /Users/username/.rvm/gems/ruby-2.1.3
ruby-2.1.3 - #importing gemsetfile /Users/username/.rvm/gemsets/default.gems evaluated to empty gem list
ruby-2.1.3 - #generating default wrappers........
Updating certificates in '/etc/openssl/cert.pem'.
mkdir: /etc/openssl: Permission denied

While running rvm install with sudo might fix this error, when the command is not run with sudo, it should still work (e.g. by asking current user's password).

@mpapis
Copy link
Member

mpapis commented Oct 25, 2014

we have code to do the sudo here https://github.com/wayneeseguin/rvm/blob/06e93b166ff9593be632b59dd2ba0e4f70e901e9/scripts/functions/osx-ssl-certs#L10:

requirements_osx_update_openssl_cert_create_dir()
{
  [[ -d "$ssl_dir" ]] || mkdir -p "$ssl_dir" || __rvm_try_sudo mkdir -p "$ssl_dir" ||
  {
    typeset __ret=$?
    rvm_error "Can not create directory '$ssl_dir' for certificates."
    return ${__ret}
  }
}

what version of RVM is this?

@behrangsa
Copy link
Author

It is version 1.25.34.

@mpapis
Copy link
Member

mpapis commented Oct 25, 2014

the above commit should clarify it (run rvm get head), but as the directory already exist you could not reproduce it without removing it first

@pkuczynski pkuczynski added this to the rvm-1.27.0-before milestone May 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants