Error Writing Permission Denied Linux
Contents |
communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start 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 linux group write permission denied developers or posting ads with us Ask Ubuntu Questions Tags Users Badges Unanswered Ask Question _ mount error 13 permission denied linux Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute: Sign up Here's how linux error 13 permission denied oracle it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Nano edit, permission denied up vote -1 down vote favorite I am trying to edit a index.php by using
Permission Denied Linux Chmod
sudo nano index.php. Nano opens me into index.php, then i add the code into the file, save and try to exit but it says permission denied. I am using ssh session in terminal and also Amazon web services... I am signed in on an ubuntu@IPADDRESS. any help? 14.04 permissions sudo aws nano share|improve this question edited Sep 9 '14 at 17:02 Volker Siegel 6,14122144 asked Sep 9 '14 at 15:45 Kristin Kohler 111 add a comment| 1 Answer 1 active oldest permission denied linux script votes up vote 2 down vote While your user may have permission to read the file, your user doesn't have permission to write the file. Use ls -l
communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start 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 permission denied linux folder About Us Learn more about Stack Overflow the company Business Learn more about
Permission Denied Linux Terminal
hiring developers or posting ads with us Ask Ubuntu Questions Tags Users Badges Unanswered Ask Question _ Ask Ubuntu is a
Permission Denied Linux Mint
question and answer site for Ubuntu users and developers. 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 http://askubuntu.com/questions/522003/nano-edit-permission-denied are voted up and rise to the top Save an edited file in nano, but no permissions up vote 11 down vote favorite 2 I edited a file in /etc/ that I want to save, but forgot to open it using sudo. I remember there was a command to save such a file in vi, and want to know if there is any such way to do http://askubuntu.com/questions/15447/save-an-edited-file-in-nano-but-no-permissions it in nano? Thanks. sudo text-editor nano share|improve this question asked Nov 30 '10 at 5:07 theTuxRacer 5,871135183 The changes are extensive. I suppose I can open a new terminal, hen-pick the changes and copy paste them. Or just copy-paste the whole thing. But I was wondering if there was a "geeky" way of doing it. –theTuxRacer Nov 30 '10 at 5:19 add a comment| 3 Answers 3 active oldest votes up vote 12 down vote accepted Yes you could save it temporarily to your home directory.Press Ctrl+O to change the path to your home directory or in /tmp and then press Enter to save it.Then you can sudo mv it. Press CTRL+O will show you the path.Change that to your home directory or /tmp.For example File Name to Write: /tmp/filename and press enter. share|improve this answer edited Nov 30 '10 at 5:42 Marco Ceppi♦ 31k20132180 answered Nov 30 '10 at 5:23 karthick87 28.3k40139203 1 You need to sudo cp </full/temp/name> </full/original/name> and rm </full/temp/name> to maintain permissions on the original file. sudo mv will destroy them, which is not what you want, especially if it had executable permissions. –Martin Thornton Jul 11 '15 at 14:34 ad
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 http://stackoverflow.com/questions/17357652/permission-denied-when-editing-bash-profile Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow 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 still learning the CLI and the ins and outs of it, permission denied 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 following error: [ Error writing /home/myname.bash_profile Permission denied ] linux command-line-interface .bash-profile share|improve this question asked permission denied linux 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 answer. also, an excellent explanation. –xyclos Apr 22 '14 at 18:30 add a comment| up vote 0 down vote You need root permissions to edit. Edit it with sudo or login as root