From owner-freebsd-questions Mon Dec 3 7: 8:52 2001 Delivered-To: freebsd-questions@freebsd.org Received: from web13301.mail.yahoo.com (web13301.mail.yahoo.com [216.136.175.37]) by hub.freebsd.org (Postfix) with SMTP id 5EFFB37B405 for ; Mon, 3 Dec 2001 07:08:46 -0800 (PST) Message-ID: <20011203150842.32811.qmail@web13301.mail.yahoo.com> Received: from [193.174.9.99] by web13301.mail.yahoo.com via HTTP; Mon, 03 Dec 2001 16:08:42 CET Date: Mon, 3 Dec 2001 16:08:42 +0100 (CET) From: =?iso-8859-1?q?m=20p?= Subject: Re: Modifying only certain bits with chmod To: anthony@freebie.atkielski.com Cc: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > Am I missing something, or is there no way to set or reset only certain > permission bits--while leaving the others unchanged--using chmod with the > octal permissions field? If chmod doesn't allow this, is there any other > similar command that does? > > Essentially what I was thinking of was, say, clearing a write bit on the > permissions of a group of files without changing any of the other bits (which > may not be the same for each file). The symbolic form of the chmod command is > awkward (at least for me). Hi Anthony, quick googeling with "tutorial chmod" showed the following: http://catcode.com/teachmod/ especially: http://catcode.com/teachmod/shortcuts.html In short: You type "cd /path/to/where/the/files/are", then "chmod g-w yourfilehere". You have the relative modes o (owner), g (group) and a (all). For that you can + (add), - ("substract") or = (equal) the rights without touching the other access flags. And you can do the absolut setting for chmod with octal numbers. Possible expressions are: chmod og-wx * chmod 400 * Hope that helps Marc __________________________________________________________________ Nokia 5510. Verrücktes Design! Toller Sound! Entdecke und gewinne es auf http://de.promotions.yahoo.com/nokia/ Gewinnspiel endet am 16. Dezember 2001. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message