View Single Post
Posts: 150 | Thanked: 93 times | Joined on Oct 2009 @ Pennsylvania, US
#5
It's possible that your .ash_history has the incorrect permissions/ownership. This should only occur if the first time you open xterm you sudo gainroot - since no .ash_history exists, when you exit root's shell it is created with only root having permission to write (preventing non-root command history from being written to the file).

Use 'ls -l /home/user/.ash_history' to verify. If the file is owned by root (3rd column), that is your problem.

sudo gainroot
chown user.users /home/user/.ash_history

OR

sudo gainroot
chmod a+w /home/user/.ash_history

Either will fix the permissions to allow non-root command history to be retained.

Last edited by rewt; 2009-12-14 at 18:44.
 

The Following 7 Users Say Thank You to rewt For This Useful Post: