I am trying to change my .bash_profile and it spits back
error writing to .bash_profile Permission denied
So, I use the chattr -i .bash_profile to make it immutable and it gives me
-bash: chattr: command not found.
Can someone please help me on this?
If you use Ubuntu or Debian you can use
apt-get install e2fsprogs
Then you try again.
Why do you assume, from that message, that the file is "immutable" and needs you to do a chattr -i?
You haven't given quite enough information to tell what the problem is, but my first thoughts are that 1) the file is not owned by you (created while su'ed or sudo'ed, perhaps), or 2) the permissions don't allow you to write to the file.
If you are indeed the owner (or can do a chown to make yourself the owner, assuming that's appropriate) try doing chmod u+w on it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With