Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

-bash: /Users/myname/.bash_profile: Permission denied

Tags:

I installed rvm (ruby version manager) and it was success, but I got

WARNING: You have '~/.profile' file, you might want to load it, to do
that add the following line to '/Users/myname/.bash_profile': source
~/.profile

I am new to developing, terminals and all that jazz! But better late than never?!

I entered into terminal:

'/Users/myname/.bash_profile'

and got back the following line

-bash: /Users/myname/.bash_profile: Permission denied
myname-MacBook-Pro:~ myname$

And that is where I am stuck! I need vrm for Drupal (Omega development) and want to make sure that everything is working fine. Thanks for your help.

like image 617
Zel Avatar asked May 06 '14 19:05

Zel


2 Answers

Enter the .bash_profile file by running this in your terminal:

vim ~/.bash_profile

If you still get permission denied, run sudo before the vim command

sudo vim ~/.bash_profile

From there , press insert button . then add the text source ~/.profile to .bash_profileand press esc and then hit :x on your keyboard to save and close the file. Opening a new terminal window should remove the error.

like image 51
Bobby Matson Avatar answered Sep 18 '22 11:09

Bobby Matson


Entering a filename will try to execute it. Instead, you want to edit it.

Open TextEdit (or your favorite editor) and open the file /Users/myname/.bash_profile in it.

You can do this entirely through the UI, but if you want, you can start an editor from the terminal:

open -a TextEdit /Users/myname/.bash_profile

You can then add the line source ~/.profile to the file and save it.

Close the terminal and open it again to apply the changes.

like image 40
that other guy Avatar answered Sep 20 '22 11:09

that other guy