Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Setting default group (newgrp ?)
- X-seq: zsh-users 13652
- From: "Benjamin R. Haskell" <zsh@xxxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxxxxx>
- Subject: Re: Setting default group (newgrp ?)
- Date: Tue, 6 Jan 2009 17:32:37 -0500 (EST)
- In-reply-to: <b11ea23c0901061406i6b2ba6b2y9ab797a9bc4e6803@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <b11ea23c0901061406i6b2ba6b2y9ab797a9bc4e6803@xxxxxxxxxxxxxx>
On Tue, 6 Jan 2009, Webb Sprague wrote:
How do I set my default group, so that when I create a file it gets the
new group ownership?
I get all sorts of weird results when I try newgrp foogroup....
newgrp foogroup works for me.
$ zsh --version
zsh 4.3.6 (i686-pc-linux-gnu)
I often find bizarre results when I've added myself to a group but haven't
yet rebooted. IIRC, one workaround is to restart nscd. Another is to log
in as yourself, but that only works in the shell you log into
(already-opened shells don't catch the change).
I have two alii(/aliases) set for this purpose:
alias z=' exec zsh'
alias Z=' exec sudo su bhaskell -'
They're mostly for testing Zsh startup script changes. But, the latter one
handles this particular problem. (adding myself to a group without
restarting.) The leading space prevents these from showing up in history.
The 'exec' prevents having to Ctrl+D twice to exit.
Best,
Ben
Messages sorted by:
Reverse Date,
Date,
Thread,
Author