This problem is in an up-to-date 12.04, and seems to have started recently.
I have my .bash_history file set to read only. Lately I've noticed that despite this the file is being modified ! Here's the scenario. In a new terminal, here is the tail of the file:
$ tail -5 .bash_history mkdir -p ttt ; gs -dNOPAUSE -sDEVICE=png16m -r180 -sOutputFile=ttt/p%03d.png *.pdf rsync -av /home/u1204 /media/SEAGATE/u1204 gnote.late.reminders|GREP_COLOR='1;32' egrep -i "is overdue" pvr_iplayer -x -HD /home/u1204/Documents/pvr/tv-hd ; pvr_iplayer -x -STD /home/u1204/Documents/pvr/tv-std exit
open a shell with raised privileges
$ sudo bash [sudo] password for u1204: # ls -l ~/.bash_history -r-------- 1 u1204 u1204 1266 Feb 23 19:52 /home/u1204/.bash_history
so .bash_history is still definitely read-only. Do something, then exit the escalated shell:
# echo "written to history file" written to history file # exit exit
And Voilà, the history file has been modified !
$ ls -l ~/.bash_history -r-------- 1 u1204 u1204 1324 Feb 23 20:10 /home/u1204/.bash_history
Open another terminal to confirm:
$ tail -5 .bash_history pvr_iplayer -x -HD /home/u1204/Documents/pvr/tv-hd ; pvr_iplayer -x -STD /home/u1204/Documents/pvr/tv-std exit ls -l ~/.bash_history echo "written to history file" exit
I'm pretty sure that it didn't used to do this (in 10.04 at least).
Anyway, this can't be correct behaviour, can it?