heroku / legacy-cli

Heroku CLI
https://cli.heroku.com
MIT License
1.37k stars 381 forks source link

Issue with Heroku CLI, Error: Permission denied - /Users/username/.local/share/heroku (Errno::EACCES) #1969

Closed theartsnetwork closed 8 years ago

theartsnetwork commented 8 years ago
$ heroku help
heroku-cli: Installing CLI... 20.15MB/20.15MB !    Heroku client internal error.
 !    Search for help at: https://help.heroku.com
 !    Or report a bug at: https://github.com/heroku/heroku/issues/new

    Error:       Permission denied - /Users/username/.local/share/heroku (Errno::EACCES)
    Command:     heroku help
    Version:     heroku-toolbelt/3.43.2 (x86_64-darwin10.8.0) ruby/1.9.3
    Error ID:    eac002dac9484360921f63545634aa2b

This error is consistent with all the Heroku commands even after re-installing the fresh Heroku Toolbelt installation.

here is the error log if it helps

2016/06/16 10:44:50 Updating Heroku v4 CLI to 4.99.0-e5f5ef4 (master)... 
2016/06/16 10:44:58 done
2016/06/16 10:44:58 reexecing new CLI...
Heroku client internal error.
Permission denied - /Users/username/.local/share/heroku
/usr/local/heroku/ruby/lib/ruby/1.9.1/fileutils.rb:247:in `mkdir'
/usr/local/heroku/ruby/lib/ruby/1.9.1/fileutils.rb:247:in `fu_mkdir'
/usr/local/heroku/ruby/lib/ruby/1.9.1/fileutils.rb:221:in `block (2 levels) in mkdir_p'
/usr/local/heroku/ruby/lib/ruby/1.9.1/fileutils.rb:219:in `reverse_each'
/usr/local/heroku/ruby/lib/ruby/1.9.1/fileutils.rb:219:in `block in mkdir_p'
/usr/local/heroku/ruby/lib/ruby/1.9.1/fileutils.rb:205:in `each'
/usr/local/heroku/ruby/lib/ruby/1.9.1/fileutils.rb:205:in `mkdir_p'
/usr/local/heroku/lib/heroku/jsplugin.rb:154:in `block in setup'
/usr/local/heroku/ruby/lib/ruby/1.9.1/tmpdir.rb:83:in `mktmpdir'
/usr/local/heroku/lib/heroku/jsplugin.rb:135:in `setup'
/usr/local/heroku/lib/heroku/cli.rb:27:in `start'
/usr/local/bin/heroku:24:in `<main>'
Heroku client internal error.
Permission denied - /Users/username/.local/share/heroku
/usr/local/heroku/ruby/lib/ruby/1.9.1/fileutils.rb:247:in `mkdir'
/usr/local/heroku/ruby/lib/ruby/1.9.1/fileutils.rb:247:in `fu_mkdir'
/usr/local/heroku/ruby/lib/ruby/1.9.1/fileutils.rb:221:in `block (2 levels) in mkdir_p'
/usr/local/heroku/ruby/lib/ruby/1.9.1/fileutils.rb:219:in `reverse_each'
/usr/local/heroku/ruby/lib/ruby/1.9.1/fileutils.rb:219:in `block in mkdir_p'
/usr/local/heroku/ruby/lib/ruby/1.9.1/fileutils.rb:205:in `each'
/usr/local/heroku/ruby/lib/ruby/1.9.1/fileutils.rb:205:in `mkdir_p'
/usr/local/heroku/lib/heroku/jsplugin.rb:154:in `block in setup'
/usr/local/heroku/ruby/lib/ruby/1.9.1/tmpdir.rb:83:in `mktmpdir'
/usr/local/heroku/lib/heroku/jsplugin.rb:135:in `setup'
/usr/local/heroku/lib/heroku/cli.rb:27:in `start'
/usr/local/bin/heroku:24:in `<main>'
ransombriggs commented 8 years ago

@theartsnetwork it appears that the user you are trying to run the heroku commands as does not have access to /Users/username/.local/share or it /Users/username/.local/share is not writable, could you please verify that the user can write to that directory? If you could paste in the output of ls -lh /Users/username/.local/share/heroku I can walk you through this process.

theartsnetwork commented 8 years ago

Tried the output of ls -lh /Users/username/.local/share/heroku It gives me this ls: /Users/username/.local/share/heroku: No such file or directory.

ransombriggs commented 8 years ago

@theartsnetwork the heroku directory cannot be created, could you please check that /Users/username/.local/share is writable by your user? Looking back at my previous comment, I realized that I should have asked you to paste ls -lh /Users/username/.local/share instead, could you please paste that in here?

theartsnetwork commented 8 years ago

output for ls -lh /Users/username/.local/share total 0 drwxr-xr-x 3 root staff 102B Sep 26 2015 bower

ransombriggs commented 8 years ago

@theartsnetwork It appears that /Users/username/.local/share may be owned by root, could you please change the ownership to your username.

chown username /Users/username/.local/share