From owner-freebsd-questions@FreeBSD.ORG Mon Aug 16 22:09:25 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B5C671065698 for ; Mon, 16 Aug 2010 22:09:25 +0000 (UTC) (envelope-from demelier.david@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 3F1918FC18 for ; Mon, 16 Aug 2010 22:09:24 +0000 (UTC) Received: by bwz20 with SMTP id 20so2696244bwz.13 for ; Mon, 16 Aug 2010 15:09:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=+2soWTGwud4+5T+1yPcvNy7TLFFOaLxVYWYUUaoBpNM=; b=Avt50+FGkd7R6FlMIqszgW6i8/KR7cx2vGdaM/s0Byl+3neT9FouarDYdojOtcCXVh rkS6OLLHJk86BgDH5Ls75SK1M4foiQxCydKYipAdmwivnpTTUhiglS0Xvx+BUgzVBRQD wCYmto8r67smoKsAyrrOgepm5H1ycAhgTXjeI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=mbT7WvA4TefINQ7LwZmFL36wTHR9jnit+JHb8W21ZosDvP7FxLoLj4/VJU8xJVBRih OjdN/lOgNs29GoxtKtmxUq6dIZVpG+tABxpo9APxYoDByjsOCPLod6MRupHQ3xHoaetb 7/KlVQ5YNclFFDOx/L5Wn8Ik/HTudTnkPhp5A= MIME-Version: 1.0 Received: by 10.204.178.82 with SMTP id bl18mr3770202bkb.118.1281996563769; Mon, 16 Aug 2010 15:09:23 -0700 (PDT) Received: by 10.204.83.29 with HTTP; Mon, 16 Aug 2010 15:09:23 -0700 (PDT) In-Reply-To: <20100816181703.GB66710@slackbox.erewhon.net> References: <20100816181703.GB66710@slackbox.erewhon.net> Date: Tue, 17 Aug 2010 00:09:23 +0200 Message-ID: From: David DEMELIER To: Roland Smith Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-questions@freebsd.org Subject: Re: watch(8) does not work in jails X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2010 22:09:25 -0000 2010/8/16 Roland Smith : > On Mon, Aug 16, 2010 at 11:23:00AM +0200, David DEMELIER wrote: >> Hi, >> >> I enabled `device snp' in my kernel config file and with this I can >> use the command watch(8) to see any tty device attached. For example : >> >> # watch ttyv0 >> >> Give me the output of the console. >> >> But in jails, it's not the same thing, I tried the following : >> >> # jexec 1 tcsh >> # su - >> People# watch pts/0 >> watch: fatal: cannot open snoop device >> >> Is there a limitation of watch(8), or jails ? > > Does /dev/pts/0 actually exist in the jail's devfs instance, and are its > permissions correct? > (In jail) : # ls -l /dev/pts/* crw--w---- 1 markand tty 0, 94 17 Aug 00:06 /people/dev/pts/0 crw--w---- 1 markand tty 0, 96 17 Aug 00:06 /people/dev/pts/1 crw--w---- 1 root tty 0, 101 21 Jul 00:07 /people/dev/pts/2 crw--w---- 1 markand tty 0, 108 17 Aug 00:06 /people/dev/pts/3 crw--w---- 1 markand tty 0, 99 16 Aug 01:28 /people/dev/pts/4 crw--w---- 1 markand tty 0, 112 17 Aug 00:05 /people/dev/pts/5 crw--w---- 1 root tty 0, 111 17 Aug 00:06 /people/dev/pts/6 crw--w---- 1 root tty 0, 114 16 Aug 23:53 /people/dev/pts/7 crw--w---- 1 root tty 0, 100 17 Aug 00:06 /people/dev/pts/8 I don't understand why pts/0 is given to me since on the host I don't have = it : (On host) : markand@Orange ~ $ who markand pts/6 16 Aug 23:57 (192.168.1.20) markand pts/7 16 Aug 23:52 (192.168.1.20) markand pts/8 17 Aug 00:06 (192.168.1.20) markand pts/9 17 Aug 00:06 (192.168.1.20) But in the jail pts/0 is affected to a completely different user. I'm confused. > Roland > -- > R.F.Smith =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 http://www.xs4all.n= l/~rsmith/ > [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated] > pgp: 1A2B 477F 9970 BA3C 2914 =C2=A0B7CE 1277 EFB0 C321 A725 (KeyID: C321= A725) > --=20 Demelier David