zsh-users
 help / color / mirror / code / Atom feed
* can't write zsh_history
@ 2006-10-12 17:35 Michael Hernandez
  2006-10-12 18:02 ` Peter Stephenson
  0 siblings, 1 reply; 10+ messages in thread
From: Michael Hernandez @ 2006-10-12 17:35 UTC (permalink / raw)
  To: zsh-users

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.


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2006-10-14 20:46 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-12 17:35 can't write zsh_history Michael Hernandez
2006-10-12 18:02 ` Peter Stephenson
2006-10-13 14:27   ` William Scott
2006-10-13 14:30     ` William Scott
2006-10-13 14:42       ` Michael Hernandez
2006-10-13 16:44       ` Roman Neuhauser
2006-10-13 14:56     ` Stanislaw Halik
2006-10-13 16:58     ` Jeremy Hankins
2006-10-14  1:49     ` Phil Pennock
2006-10-14 20:46       ` William Scott

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).