This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: user-specific mounts


On Fri, 14 May 2004, Baurjan Ismagulov wrote:

> Hello, Igor!
>
> On Thu, May 13, 2004 at 01:50:33PM -0400, Igor Pechtchanski wrote:
> > Create a system-owned shell (via "at <curtime+1> /interactive bash -i")
> > and use "mount" to set up user mounts for the user "system".  You may need
> > to remove the system mounts altogether, and just create user mounts for
> > every potential Cygwin user, although the user mounts *should* take
> > precedence over the system ones.
>
> So, you mean HKCU is honored and should be read before HKLM, and this
> may be a bug? I'll try your workaround and share the results.

According to mount_info::from_registry() (in path.cc), the user mounts are
read before the system ones, and therefore appear earlier in the mount
table.  I'm pretty sure the mount table is accessed linearly, so the
earlier items take precedence, but it would be nice if someone confirmed
this.

> > BTW, your report would have benefited *a lot* from you following the
> > Cygwin problem reporting guidelines at <http://cygwin.com/problems.html>
> > and attaching your cygcheck output...
>
> The first question was whether such kind of setup was supposed to work
> at all. Considering this a usage in a weird way, rather than a user
> problem, I left the details for the second iteration.

Even though the usage is certainly unconventional, I don't see any reason
why this shouldn't work.  However, including the standard problem
reporting information would have shown us whether what your system thinks
its state is is the same as what you think it is.

> Sorry if I prevented you from providing premium support :) , will do my
> best to avoid this in the future.
>
> Such a question arose after I had not been able to find a statement in
> the user manual regarding this issue; I'm pretty sure you will show it
> to me :) , but all I could find was the following:
>
>    The mapping is stored in the current user's Cygwin mount table in the
>    Windows registry so that the information will be retrieved next time the
>    user logs in. Because it is sometimes desirable to have system-wide as
>    well as user-specific mounts, there is also a system-wide mount table that
>    all Cygwin users inherit.
>
> So I was not sure whether HKCU was supposed to override HKLM, or whether
> the HKLM entries were mounted first, and directories in HKCU that were
> still not mounted were mounted afterwards.

I would probably read the above as "HKCU overrides HKLM", but I agree, it
could be clearer.  In the spirit of "WJM", I have to add that "there's
always the code"(tm). :-)

> As to cygcheck: seems that I screwed the installation. Cygcheck aborts
> saying "'id' program not found", although it is present under
> /cygdrive/c/cygwin/bin. The output is attached, but I doubt it would
> help.

Even the partial output you attached already shows an indication of a
problem -- you said that "id" exists under /cygdrive/*c*/cygwin/bin (why
not /bin, BTW?), whereas cygcheck has *g*:/cygwin/bin in the path.

> Should I send you the output of a specific command, or set the
> root to c:\cygwin and re-run cygcheck?
>
> With kind regards,
> Baurjan.

I would try starting from scratch with the mounts -- first get a working
system (for one user) with user mounts, then add *one* system mount and
see if the user mount overrides it.  If it does, add more system mounts.
It would help to save the output of "mount -m" at certain points along the
way, so that you can restore the mount state to that which you *know*
works.

As an aside, "it would be nice"(tm) to get an option for "mount" that
would show (and allow setting) the mounts of another user (as long as the
current user has appropriate privileges).  It would also be great if
cygcheck showed the mounts for the SYSTEM user as well as those for the
current user and the system ones.  I'm planning to work on this when I get
a chance, but wanted to get this into the archives for now.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]