-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to SuiChangsheng on 5/21/2009 8:35 PM: > hello, dear sir: > Nice writing to u. > > 'cos there's reason that need to > log in as root(e.g e:/). > i need to use the command < chroot > > in cygwin, however, there's problem > please see attached file.
In the future, please copy and paste the contents of the terminal, rather than taking a screenshot of it. It makes it much easier to deal with in technical lists, where HTML mail is frowned upon and plain text is the medium of choice for bandwidth purposes. The command chroot does nothing in cygwin. Well, it temporarily changes the notion of the current / directory, but it adds no security (unlike on a real Unix system, where it makes anything outside of the new / inaccessible to the chroot'd process hierarchy). This is because cygwin sits on top of the OS, and you can still bypass the cygwin layer and use the underlying OS to access outside your new root. Did you intend, instead, to change the cygwin mount table of which underlying Windows directory should be treated as the cygwin root? > > Could u please help teach us why? > Thanks so much and have a nice day! Your screenshot showed: $ chroot . chroot: cannot run command `/bin/sh': No such file or directory This would happen on any OS if you have failed to first set up the directory to operate correctly prior to the chroot call. In other words, everything that your new jail environment will need (including /bin/sh) must be replicated into the new hierarchy that you will be changing to once you use the chroot command. A couple of final notes - since your question is about cygwin, you may be better off asking it on the cygwin mailing lists. And "u" is not a word; abbreviating "you" makes your email come across as unrefined, and you are less likely to get favorable responses: http://www.catb.org/~esr/faqs/smart-questions.html#writewell - -- Don't work too hard, make some time for fun as well! Eric Blake [email protected] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkoWHwsACgkQ84KuGfSFAYD5jwCgqC7RxHPQfWUg0OBUOF9MYxt8 fN8An139FNO80QfRb9bwWoMIc3fDsYy8 =WczW -----END PGP SIGNATURE----- _______________________________________________ Bug-coreutils mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-coreutils
