Error Writing .bash_profile Permission Denied Mac
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more
Where Is My Bash Profile Mac
about Stack Overflow the company Business Learn more about hiring developers or posting ads mac terminal bash profile with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow
Osx Bash Profile
is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Permission Denied when editing .bash_profile up vote 2 down vote favorite I'm .bash_profile permission denied in linux still learning the CLI and the ins and outs of it, especially this .bash_profile. I feel overwhelmed with what I'm learning about this. Anyways, I can access .bash_profile. If I do nano ~/.bash_profile then the file appears and I'm free to edit. And then I tried addingin the line I'm supposed to include: export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH" However, when I try to save the file (or whatever .bash_profile is), I get the source .bash_profile permission denied following error: [ Error writing /home/myname.bash_profile Permission denied ] linux command-line-interface .bash-profile share|improve this question asked Jun 28 '13 at 5:13 simplycoding 4191416 add a comment| 2 Answers 2 active oldest votes up vote 3 down vote While you can do sudo nano ~/.bash_profile to edit the file, I feel like it's a bit weird that your .bash_profile needs root to be modified. If you try ls -la ~ | grep bash -rw------- 1 Greg staff 8622 27 Jun 16:06 .bash_history -rw-r--r-- 1 Greg staff 2189 28 Jun 01:24 .bash_profile You see my .bash_profile is owned by me, Greg, not root. I think you'll find that when you do this, your .bash_profile will be owned by root. This means that when you want to edit the file, you need to use sudo, but I don't. If you don't want to have to use sudo all the time to modify this file, you can change the owner of the file sudo chown yourusername ~/.bash_profile Now if you run the ls command I showed above, you should see your name as the owner of the file, instead of root. share|improve this answer answered Jun 28 '13 at 5:41 gkayling 14315 this is definitely the correct ans
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow
/home/user/.bash_profile Permission Denied
the company Business Learn more about hiring developers or posting ads with us Super bash_profile permission denied ubuntu User Questions Tags Users Badges Unanswered Ask Question _ Super User is a question and answer site for computer enthusiasts and power
/.profile Permission Denied
users. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Mac OSX Lion http://stackoverflow.com/questions/17357652/permission-denied-when-editing-bash-profile Terminal ~/.bash_profile Permission Denied up vote 0 down vote favorite I am an extreme beginner at Terminal. I was trying to root my Android phone. I altered something after typing in ~/.bash_profile. I did it incorrectly. Now I need to reenter it to do it correctly and I am being denied permission. I have no idea what to do. I type in ~/.bash_profile and I receive -bash: /Users/Nader/.bash_profile: Permission denied If you could http://superuser.com/questions/369406/mac-osx-lion-terminal-bash-profile-permission-denied put the answer in babysteps that would be great because I have little to no idea what I am doing. osx terminal permissions .bash-profile share|improve this question edited Dec 19 '11 at 7:29 slhck 125k38315362 asked Dec 19 '11 at 6:38 Nader 1113 add a comment| 2 Answers 2 active oldest votes up vote 1 down vote Assuming it's the .bash_profile on your Mac: Open any text editor, such as TextEdit. Press Cmd-O to open the Open File dialog. Press Cmd-Shift-. to show hidden files and folders. Select .bash_profile in your home directory and edit its contents. It's probably best to delete all of the content (after storing it somewhere, just in case), the file is optional and contains personal preferences. share|improve this answer answered Dec 19 '11 at 6:52 Daniel Beck♦ 79.8k9189252 Thanks for the response. I don't understand how to select .bash_profile where exactly in my home directory is it supposed to be located? –Nader Dec 19 '11 at 7:02 It's supposed to be right there. Unless you actually haven't created the file yet. If it's not there, you can just create it with that name. It might be good to know what exactly you typed before you had the issue. And give us the output of ls -la ~. &n
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or http://superuser.com/questions/409501/edit-bash-profile-in-os-x posting ads with us Super User Questions Tags Users Badges Unanswered Ask Question _ Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Edit .bash_profile in OS X up vote 4 down vote favorite 4 How do I edit the bash_profile? I've tried using permission denied the command chflags but it shows the error [Error writing. Bash_profile: Operation not permitted] I'm using OS X Snow Leopard 10.6.8. osx bash osx-snow-leopard .bash-profile share|improve this question edited Apr 7 '12 at 7:55 slhck 125k38315362 asked Apr 6 '12 at 20:01 Daniel Frame migrated from stackoverflow.com Apr 6 '12 at 22:21 This question came from our site for professional and enthusiast programmers. It could be useful to see the output of these commands id and ls -ld . .bash_profile bash_profile permission denied –Brian Swift Apr 6 '12 at 23:29 add a comment| 2 Answers 2 active oldest votes up vote 10 down vote In most cases, the file doesn't even exist unless you specifically create it. In order to do this, you don't need chflags. In fact, if you're a typical user, you don't need chflags at all with your Mac. Just enter: cd touch .bash_profile You can then edit it with whatever application you like, for example a terminal-based editor like vim, nano, or even TextEdit: vim .bash_profile nano .bash_profile open -a "TextEdit" .bash_profile After you've edited the file, make sure to source the .bash_profile again. Otherwise, bash won't recognize the changes: source .bash_profile If for some reason you don't have permissions, make sure your .bash_profile looks like this when doing a directory listing with ls -la – i.e. mode 644, owned by yourself. charon:~ werner$ ls -l .bash_profile -rw-r--r-- 1 werner staff 1323 Apr 4 18:00 .bash_profile share|improve this answer answered Apr 7 '12 at 7:53 slhck 125k38315362 Great ! You saved my day ! –Durai Amuthan.H May 20 '15 at 11:36 add a comment| up vote 0 down vote If you are comformatble using vim that should work fine. Open Terminal (/Applications/Utilities/Terminal.app) Type vim .bash_profile share|improve this answer answered Apr 6 '12 at 20:13 Chris add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using E