delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/11/01/21:35:54

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs
Date: Sat, 1 Nov 2003 21:35:40 -0500 (EST)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: "Lee D. Rothstein" <lee AT veritech DOT com>
cc: cygwin AT cygwin DOT com
Subject: Re: Mount Confusion -- the tallest pique in the world!
In-Reply-To: <6.0.0.20.0.20031101162456.16e67210@rogue.codemeta.com>
Message-ID: <Pine.GSO.4.56.0311012122491.9707@slinky.cs.nyu.edu>
References: <6 DOT 0 DOT 0 DOT 20 DOT 0 DOT 20031030083220 DOT 071a6320 AT rogue DOT codemeta DOT com>
<Pine DOT GSO DOT 4 DOT 56 DOT 0310311247130 DOT 13697 AT slinky DOT cs DOT nyu DOT edu>
<6 DOT 0 DOT 0 DOT 20 DOT 0 DOT 20031031144513 DOT 266e0280 AT rogue DOT codemeta DOT com>
<Pine DOT GSO DOT 4 DOT 56 DOT 0311011521420 DOT 9707 AT slinky DOT cs DOT nyu DOT edu>
<6 DOT 0 DOT 0 DOT 20 DOT 0 DOT 20031101162456 DOT 16e67210 AT rogue DOT codemeta DOT com>
Importance: Normal
MIME-Version: 1.0

On Sat, 1 Nov 2003, Lee D. Rothstein wrote:

> At 2003-11-01 03:27 PM, Igor Pechtchanski wrote:
> >> At 2003-10-31 01:08 PM, Igor Pechtchanski wrote:
>
> >> Why do /zc, /zd, /ze, /zf, /zg, ... ('mount c:/ /zc', ...
> >> 'mount g:/ /zg, ...) appear in ls output when no prior
> >> 'mkdir's have been carried out. What's different between
> >> /tmp and /<everything else>?
> >
> >WAG: this may be due to the code that lists /cygdrive automatic mounts
> >(since your cygdrive prefix is set to "/", you get your drives listed).
>
> 1st, the only cygdrive prefix that works on my system is /cygdrive/.
> 2nd, no matter what I set the prefix to /cyggdrive/ is the only
>      prefix that works.
> 3rd, even using your suggestion of 'mount -c -b -s /IIFOIALIP', for
>      example:
>
> cd /IIFOIALIP/c/ # does not get me to c:/, whereas
> cd /cygdrive/c/  # gets me there before during and after!!

I'm sorry, you must be doing something wrong:

$ mount -u -b -c "/IIFOIALIP"
$ ls /IIFOIALIP/c/cygwin/
Cygwin.bat*  bin/       dev/  export/  lib/  proc/  tmp/  var/
Cygwin.ico*  cygdrive/  etc/  home/    mnt/  root/  usr/
$ ls /cygdrive/c/cygwin/
/bin/ls: /cygdrive/c/cygwin/: No such file or directory
$ mount -u -b -c "/cygdrive"
$ ls /IIFOIALIP/c/cygwin/
/bin/ls: /IIFOIALIP/c/cygwin/: No such file or directory
$ ls /cygdrive/c/cygwin/
Cygwin.bat*  bin/       dev/  export/  lib/  proc/  tmp/  var/
Cygwin.ico*  cygdrive/  etc/  home/    mnt/  root/  usr/
$

Note: my *system* cygdrive prefix stayed "/cygdrive" throughout the above.

> Quite apart from the above:
>
> Why (how is it that) I can get /zc ... /zy to show up in the output of 'ls /',
> and I can do a cd to any of "/z?", without creating respective directories in /
> of /zc .. /zy?

Umm, could you please post the result of "ls /cygdrive/c/cygwin"?  Does it
contain all the "z*" directories?

> I submit to the group that whatever inconsistency in implementation or
> documentation is behind these problems, is the source of numerous
> configuration problems that people are having. I have run into this
> problem so many times that I refuse to let it rest until I understand
> it.
>
> >> >> Prior to my doing any of the above (w/ Cygwin root at
> >> >> 'c:/_Programs/Cygwin'), I've had recurring instances of something
> >> >> (apps?, 'setup.exe?, what?) creating 'tmp' and more frequently 'var' on
> >> >> both my 'c:' and 'e:' drives. This problem seems to have subsided since
> >> >> I moved the Cygwin root directory from 'c:/_Programs/Cygwin' to
> >> >> D:/Cygwin'.
> >> >
> >> >I'd bet you were installing as one user and running as another.
> >>
> >> You'd lose that bet. Only one ID -- Administrator. Cygwin always
> >> *only* installed for/by Administrator.
> >
> >Nope.  Services run as LocalSystem (aka SYSTEM). :-p
>
> I'm not getting the joke, and more importantly the point! Could someone
> else jump in here who is not as proud of their own sense of humor.

There is no joke.  Services (e.g., sshd, telnetd, cron) run under a
different username.  If they create files, you're likely to have them
owned by SYSTEM.  The emoticon was on the "I'd bet/you'll lose" exchange.

> >> One thing I do not understand, however, is the appearance of the
> >> owner/user SYSTEM on some files/directories when I do 'ls -l'.
> >
> >There you go. :-D
>
> There I go where? I am not installing anything as "SYSTEM". Cygwin
> setup (?) must be doing it? Why? How? How do I keep the mismatches
> from occurring again?

Another example of something owned by SYSTEM being created is by the
ssh-host-config script, which does an explicit "chown".  Some of the
"mismatches"  are necessary -- sshd, for example, won't work without them.

> >> >> Also, after I moved Cygwin, despite changing all the references in the
> >> >> profile and Windows environment variables, *and* reinstalling the whole
> >> >> of Cygwin, "Cygwin" "insisted" on looking at the C/_Programs... : root
> >> >> rather than the D:/Cygwin... directory
> >> >>
> >> >> Anybody know what's causing this?
> >> >
> >> >Stale user mounts?  Your "/", "/usr/bin" and "/usr/lib" mounts appear to
> >> >be user mounts.  You should probably remount them as "system" (i.e.,
> >> >'mount -f -s -b d:/Cygwin /', 'mount -f -s -b d:/Cygwin/bin /usr/bin',
> >> >'mount -f -s -b d:/Cygwin/lib /usr/lib', and 'umount -U').
>
> For the third time, why do I have to explicitly specify '-s' and '-b'
> when the man page says they are each the default?

You don't have to explicitly specify them, but it's good to make sure
you're doing *exactly* what you intend to do.  I've long stopped relying
on "default" option values in important tasks.  Besides, there's got to be
a reason your system cygdrive prefix ended up in textmode...

FWIW, the user cygdrive prefix does override the system one (as seen in my
example above).  However, the system one will show up for services and
such, so you may be surprised trying to access "/cygdrive/c/WINNT" from,
say, cron.

> What other sub-root directories besides /usr/bin /usr/lib require mounting
> for a valid Cygwin configuration?

None (unless your "/" is mounted in textmode, in which case /tmp and
/usr/X11R6/lib/X11/fonts should both be binary-mounted, or X won't work).

> >> As far as I know, my only cygdrive prefix is 'cygdrive'.
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

I have to concede on one point: there is no way that I know (short of the
no-no of editing the registry) of removing the user cygdrive prefix, so
you probably weren't ever exposed to the system one during normal console
operation.  I really have no idea how your system prefix could have ended
up that way (i.e., "/" and textmode).  In any case, "mount -p" or "mount
-m" should show you both prefixes.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019