This is the mail archive of the
cygwin-apps
mailing list for the Cygwin project.
Re: Question: Desired owner/group when running setup-1.7.exe
- From: Charles Wilson <cygwin at cwilson dot fastmail dot fm>
- To: Mailing List: CygWin-Apps <cygwin-apps at cygwin dot com>
- Date: Sat, 18 Apr 2009 10:13:50 -0400
- Subject: Re: Question: Desired owner/group when running setup-1.7.exe
- References: <20090418100226.GJ8722@calimero.vinschen.de>
Corinna Vinschen wrote:
> owner: Current user.
> group: The primary group of the account running setup.
> other: Everyone, as usual.
Although "current user" is Administrator if you launch setup on Vista as
an ordinary user, but you have UAC enabled.
> As the discussion in the aforementioned thread shows, this might not be
> feasible in all environments. OTOH, whatever we do, somebody *will*
> complain.
Yep!
> I don't think it makes sense to have a setting in setup.exe to choose
> user and group explicitely. We should make a default setting and
> everything else is up to the chown tool.
I'm not so sure. Your solution would mean that *every* time I update, I
would need to do a full recursive chown -R. But not *really* recursive:
I don't, for example, want to modify the ownership of stuff under /home
(or /c, /cygdrive/ //server/share/, etc). And probably I'd want to
exclude SOME stuff under /etc (such as the files owned by sshd). And if
that weren't enough, I'm doing a giant recursive chown -R as a second
manual step, after running setup.exe to update "xrsi" -- a package that
contains 8 files.
It seems to make more sense to me to have setup.exe take additional
arguments, so that it can DTRT (as determined by me) on just those 8
files -- in one step. Then I can simply change the shortcut target for
setup.exe...
However, you still need an answer to "what should setup do by default"...
> The question is, which default
> setting is the most feasible and will probably lead to the least
> complaints.
>
> So, here's the multiple choice question:
>
> How should setup.exe choose the file ownership for extracted files?
>
> [X] I like it as it is. Just keep it.
>
> [ ] If the current user is an administrative user, make "Administrators"
> the group of the files:
>
> owner: Current user.
> group: Administrators.
>
> [ ] If the current user is an administrative user, make "Administrators"
> the owner of the files:
>
> owner: Administrators.
> group: The primary group of the account running setup.
>
> Comment:
I think setup should accept three new command-line arguments:
--change-owner=
--change-group=
--add-group-write-permission
The first two are self-explanatory. The last one is very specific, and
not the "general" solution of "change perms to" because I think the
packager will have more understanding -- and more fine-grained control
over -- the appropriate perms of each individual file in his package.
That is, different files may have different perms. A setup.exe
cmd-line-arg is by definition a one-size-fits-all hammer. The *only*
reasonable use for such a hammer in this context is "I want to give a
particular group admin-like control over my entire cygwin installation".
That is,
--change-group=wheel --add-group-write-permission
--
Chuck