Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
can't write zsh_history
- X-seq: zsh-users 10850
- From: Michael Hernandez <sequethin@xxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: can't write zsh_history
- Date: Thu, 12 Oct 2006 13:35:45 -0400
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:mime-version:content-transfer-encoding:message-id:content-type:to:from:subject:date:x-mailer; b=hndMiTthc9ZGebb9m6U76cwxAb/zlJh5AsIf2rUcPu1k4ixHn8olTEKYCXBvjLdZYFbMy8hmyup3cO3JPI1NihzdSFBcHuVwV7UCDA6N/rhnJ0TiGBfxVpL8UC1JiOD/TEgato4jqtAfXJfJ9+wHjGyF/C9gf2gALn4vICU78Yc=
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
Hi all,
Every now and then I need to su on some servers that I work on
(mostly old freebsd systems that don't have sudo installed and have
no outbound net connections, i.e. installing sudo is not an option).
The problem, which is really more of an annoyance than a problem, is
that if I su to run some command and I don't cd first,
my .zsh_history file becomes owned by root. After I exit from # and
run a command as my regular user, zsh tells me that it can't write
the history file, which of course it can't because it's now owned by
root. Is there something I can do to alter the way zsh writes to my
history file when I am root? Something like "if uid is 0 then write
the history to root's history file and leave .zsh_history alone"? It
should be noted that on these machines root's shell is tcsh, except
in one case where it's ksh (not my idea I promise!) so I'm not sure
why .zsh_history is touched at all when I'm root. Another oddity is
that if I chown the file to my user, the file becomes corrupt, which
is even more frustrating. The version of zsh for each of these
machines is 4.2.6.
As I said, this is a minor annoyance, but I figured I'd ask in case
someone else has experienced this before and has a remedy.
Thanks!
Mike H
PS. I just tested this on an openbsd 3.9 firewall that I have, with
zsh version 4.2.6, and where root's shell is ksh. Same thing happens.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author