From owner-freebsd-questions Mon May 5 02:53:14 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id CAA15478 for questions-outgoing; Mon, 5 May 1997 02:53:14 -0700 (PDT) Received: from mail.EUnet.hu (www.eunet.hu [193.225.28.100]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id CAA15471 for ; Mon, 5 May 1997 02:53:10 -0700 (PDT) Received: by mail.EUnet.hu, id LAA02533; Mon, 5 May 1997 11:53:01 +0200 Received: (from zgabor@localhost) by CoDe.hu (8.7.5/8.7.3) id KAA00506; Mon, 5 May 1997 10:22:37 +0200 (MET DST) From: Zahemszky Gabor Message-Id: <199705050822.KAA00506@CoDe.hu> Subject: Re: permissions To: freebsd-questions@freebsd.org (FreeBSD questions) Date: Mon, 5 May 1997 10:22:36 +0200 (MET DST) Cc: un_x@anchorage.net In-Reply-To: from Steve Howe at "May 4, 97 01:43:14 am" X-Mailer: ELM [version 2.4ME+ PL11 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > > > > > > > why is it that i can open, modify, and save changes to a > > > > > file with r--r--r-- perms (as root)? shouldn't a file be > > > > > read only under these conditions? > > > > > > > > What do you mean, "as root"? > > joe editor ... i just checked with "pico" - it will NOT allow me to do > as described above. joe is the only one i can say for sure. > ------------------------------------------------------------------------- With vi editor, if you're root (or any other user with UID 0), you CAN save into a non-writeable file, with :w! filename or exit-with-save :x! filename format. Gabor --- #!/bin/ksh trap 'rm -f /tmp/$$.$$' EXIT HUP INT QUIT TERM&&print '21N16I25C25E30, 40M30E33E25T15U!'>/tmp/$$.$$&&IFS=' ABCDEFGHIJKLMNOPQRSTUVWXYZ '&&set -A X $(