From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27000 invoked by alias); 2 Nov 2003 02:35:43 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 26987 invoked from network); 2 Nov 2003 02:35:41 -0000 Received: from unknown (HELO slinky.cs.nyu.edu) (128.122.20.14) by sources.redhat.com with SMTP; 2 Nov 2003 02:35:41 -0000 Received: from slinky.cs.nyu.edu (localhost [127.0.0.1]) by slinky.cs.nyu.edu (8.12.10+Sun/8.12.10) with ESMTP id hA22ZfMh009755; Sat, 1 Nov 2003 21:35:41 -0500 (EST) Received: from localhost (pechtcha@localhost) by slinky.cs.nyu.edu (8.12.10+Sun/8.12.2/Submit) with ESMTP id hA22Ze4I009752; Sat, 1 Nov 2003 21:35:40 -0500 (EST) X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs Date: Sun, 02 Nov 2003 02:35:00 -0000 From: Igor Pechtchanski Reply-To: cygwin@cygwin.com To: "Lee D. Rothstein" cc: cygwin@cygwin.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: References: <6.0.0.20.0.20031030083220.071a6320@rogue.codemeta.com> <6.0.0.20.0.20031031144513.266e0280@rogue.codemeta.com> <6.0.0.20.0.20031101162456.16e67210@rogue.codemeta.com> Importance: Normal MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2003-11/txt/msg00029.txt.bz2 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 /? > > > >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@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/