From owner-freebsd-questions@FreeBSD.ORG Mon Nov 1 21:06:59 2004 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 BBE5616A4CE for ; Mon, 1 Nov 2004 21:06:59 +0000 (GMT) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6C59843D3F for ; Mon, 1 Nov 2004 21:06:59 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.11/8.13.1) id iA1L6utv044741; Mon, 1 Nov 2004 15:06:56 -0600 (CST) (envelope-from dan) Date: Mon, 1 Nov 2004 15:06:56 -0600 From: Dan Nelson To: Miguel Mendez Message-ID: <20041101210655.GH76157@dan.emsphone.com> References: <1099340416.84f75f20mia.oskar@home.se> <20041101213022.6764978c.flynn@energyhq.es.eu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041101213022.6764978c.flynn@energyhq.es.eu.org> X-OS: FreeBSD 5.3-BETA7 X-message-flag: Outlook Error User-Agent: Mutt/1.5.6i cc: oskar johansson cc: freebsd-questions@freebsd.org Subject: Re: Immuatable 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: Mon, 01 Nov 2004 21:06:59 -0000 In the last episode (Nov 01), Miguel Mendez said: > On Mon, 01 Nov 2004 21:20:16 +0100 "oskar johansson" wrote: > > Hello i was wondering how to check the immutable flag on FreeBSD, > > on linux there is something called lsattr that is mention in the > > man pages. Is ther any other way? > > Check the -o option in ls(1) Also note that Linux has only one immutable flag, where FreeBSD has two. "schg" is the system-immutable flag, settable only by root, and "uchg" is the user-immutable flag, which the file owner can set. From a C program, just use the stat() syscall, and examine the st_flags field. More info in the chflags manpage. -- Dan Nelson dnelson@allantgroup.com