title: sudo open -e ~/.bash_profile Permission denied mac
body: <p>I am trying to edit bash_profile file to add path to my sdk through the following command on my mac machine.
  sudo touch ~/.bash_profile; open -e ~/.bash_profile</p>
  
  <p>It opens the file in TextEdit but does not allow me to edit it. Though i have given super-user permission and password while running the above command. It is giving me following message when i try to edit it.</p>
  
  <p>"You don’t own the file “.bash_profile” and don’t have permission to write to it.
  You can duplicate this document and edit the duplicate. Only the duplicate will include your changes."
  I am new to mac. So please elaborate your answers.</p>