From owner-freebsd-questions@FreeBSD.ORG Tue Sep 2 12:53:36 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9D8FB16A4BF for ; Tue, 2 Sep 2003 12:53:36 -0700 (PDT) Received: from mwinf0403.wanadoo.fr (smtp5.wanadoo.fr [193.252.22.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id 840CB43F3F for ; Tue, 2 Sep 2003 12:53:34 -0700 (PDT) (envelope-from david@landgren.net) Received: from landgren.net (APastourelles-107-1-15-129.w80-13.abo.wanadoo.fr [80.13.169.129]) by mwinf0403.wanadoo.fr (SMTP Server) with ESMTP id 2186D50002FF; Tue, 2 Sep 2003 21:53:33 +0200 (CEST) Message-ID: <3F54F59D.7040809@landgren.net> Date: Tue, 02 Sep 2003 21:55:09 +0200 From: David Landgren Organization: Isn't it weird/Looks too obscure to me/Wasting away/And that was their policy User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ed Alley References: <20030902111654.K11257-100000@jordan.llnl.gov> In-Reply-To: <20030902111654.K11257-100000@jordan.llnl.gov> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-questions@freebsd.org Subject: Re: File permissions suddenly change for /dev/null. X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2003 19:53:36 -0000 Ed Alley wrote: > I'm running FreeBSD-4.8. Sometimes the file permissions for /dev/null get > mysteriously changed by some unknown process to: > > crw------- 1 root wheel 2, 2 Sep 2 11:20 /dev/null > > This has a devastating effect on user processes that want to open > /dev/null. Whenever my system starts acting funny, the first place > I look is at the permissions for /dev/null. When I find them changed > I go under root and execute: > > chmod 666 /dev/null > > to get things back to normal. > > Has anybody seen this before? Have I got a hidden umask set up > wrong somewhere, or is one of my daemons the culprit? Or could > it be happening during the time that I run as root doing > system maintenance? The only time I've had something like this happen to me was when I installed Frontpage Extension for Apache. Come to think of it, it was on a Solaris box, but no matter. Apache has two vestigal config files that no longer serve any real purpose, srm.conf and access.conf. There are two schools of thought about what to do about this. The first school says to have those files sitting in the filesystem, but empty. The second says that the configuration directives in httpd.conf that refer to those files should point to /dev/null instead, and not have any other config files. I subscribe to the latter idea: it makes for a cleaner conf/ directory. Unfortunately, Frontpage Extensions, in Microsoft's oh-so-typical couldn't give a fuck about anyone else way actually wants to put some kind of garbage in the access.conf file. Morons, the rest of the world hasn't been doing that for at least six years by my count. Anyway, rather than bombing out, the script managed to mangle /dev/null utterly, and turned it into -rw-rw-rw 1 root wheel 2, 2 Sep 2 11:20 /dev/null I.e., a *plain* file! This symptoms this produced were really bizarre. As it turned out, /dev/null on Solaris is a soft link to the real device in /device (which may be why the FPE install script was able to trash it). It was easily repaired by restoring the symlink. Anyway, the moral of the story is, what have you installed recently? David