Answer to my own KSH history question (I got no responses)

Jeffery Small jeff at cjsa.WA.COM
Mon Oct 23 04:28:42 AEST 1989


canoaf at ntvax.uucp (Augustine Cano) writes:

>The answer:  It turns out that the key is in the ownership and permissions
>of ~/.kshistory.  The permissions of this file are rw-------, if the file
>is owned by the user, it will be used by the shells.  If it is owned by root,
>the shells can't access it and will therefore create a new history of their
>own.

What I have observed is that when you "su" to root, your history file gets
remade and is now owned by root.  Now when you exit "su" back to your original
login, ksh can still continue to use the history file (probably 'cause it's
already opened) but when it comes time to remove it when you exit ksh, you
can't because it is owned by root.
--
Jeffery Small    (206) 485-5596            uw-beaver!uw-nsr!uw-warp
C. Jeffery Small and Associates                                    !cjsa!jeff
19112 152nd Ave NE - Woodinville, WA  98072           uunet!nwnexus



More information about the Comp.sys.att mailing list