From owner-freebsd-questions@freebsd.org Wed Jun 7 17:58:34 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6DC96D14A93 for ; Wed, 7 Jun 2017 17:58:34 +0000 (UTC) (envelope-from freebsd@qeng-ho.org) Received: from bede.home.qeng-ho.org (bede.qeng-ho.org [217.155.128.241]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "fileserver.home.qeng-ho.org", Issuer "fileserver.home.qeng-ho.org" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id EAAB47CD4E for ; Wed, 7 Jun 2017 17:58:33 +0000 (UTC) (envelope-from freebsd@qeng-ho.org) Received: from arthur.home.qeng-ho.org (arthur.home.qeng-ho.org [172.23.1.2]) by bede.home.qeng-ho.org (8.15.2/8.15.2) with ESMTP id v57HwVS2001173 for ; Wed, 7 Jun 2017 18:58:31 +0100 (BST) (envelope-from freebsd@qeng-ho.org) Subject: Re: /dev/null behaving strangely From: Arthur Chance To: FreeBSD-Questions References: Message-ID: <2b711fe0-41f2-143e-be44-7eb0154bbf4c@qeng-ho.org> Date: Wed, 7 Jun 2017 18:58:31 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jun 2017 17:58:34 -0000 On 07/06/2017 18:43, Arthur Chance wrote: > My main fileserver is showing very strange symptoms. > > It's running 10.3-RELEASE-p18, GENERIC kernel, amd64. I can't get a > uname from it into this mail as this is from another box and neither ssh > nor scp work to the file server. > > It started about 20 minutes ago when I got mail from cron > > ---- > From: operator@bede.home.qeng-ho.org (Cron Daemon) > To: operator@bede.home.qeng-ho.org > Subject: Cron /usr/libexec/save-entropy > > Date: Wed, 07 Jun 2017 18:22:00 +0100 > > /usr/libexec/save-entropy: cannot create /dev/null: Permission denied > ---- > > This is now happening every 10 minutes as the cron job runs. However, > running save-entropy from the command line (on the console, or over ssh > before I rebooted) works without complaint. Since I rebooted I cannot > ssh or scp to the file server, getting the errors > > arthur@arthur[7]> ssh root@fileserver > Couldn't open /dev/null: Permission denied > > arthur@arthur[4]> scp fileserver:/tmp/t /tmp/t > Couldn't open /dev/null: Permission denied As a follow up, the ssh/scp problem was a completely unrelated screw up involving /dev on this machine, a bad /devd.conf rule had chowned and chmoded /dev itself, which wasn't helpful. Fixing that meant I could ssh into the file server again. Here's the uname -a for the fileserver (apologies for the line wrap) root@fileserver:0# uname -a FreeBSD fileserver.home.qeng-ho.org 10.3-RELEASE-p18 FreeBSD 10.3-RELEASE-p18 #0: Tue Apr 11 10:31:00 UTC 2017 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 > ls -l /dev/null gives a possibly interesting result: on two other boxes > I get > > root@arthur:3# ls -l /dev/null > crw-rw-rw- 1 root wheel 0x1f 7 Jun 18:05 /dev/null > > but on the file server the device number is 0xd rather than 0x1f (owner, > group and permissions are identical). I'm not sure if this is > significant. Rebooting the file server has had no effect on the problem, > other than cutting off ssh access. > > The system disk is a relatively new SSD and smartctl shows no problems > with it. devfs mounting on /dev is the default set up, and now jails are > running to confuse things. > > Any ideas? > -- An amusing coincidence: log2(58) = 5.858 (to 0.0003% accuracy).