Date: Mon, 3 Dec 2001 16:08:42 +0100 (CET) From: =?iso-8859-1?q?m=20p?= <sumirati@yahoo.de> To: anthony@freebie.atkielski.com Cc: freebsd-questions@freebsd.org Subject: Re: Modifying only certain bits with chmod Message-ID: <20011203150842.32811.qmail@web13301.mail.yahoo.com>
next in thread | raw e-mail | index | archive | help
> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011203150842.32811.qmail>