From owner-freebsd-questions Mon Dec 3 7:51:49 2001 Delivered-To: freebsd-questions@freebsd.org Received: from freebie.atkielski.com (ASt-Lambert-101-2-1-14.abo.wanadoo.fr [193.251.59.14]) by hub.freebsd.org (Postfix) with ESMTP id 753C537B419; Mon, 3 Dec 2001 07:51:39 -0800 (PST) Received: from contactdish (win.atkielski.com [10.0.0.10]) by freebie.atkielski.com (8.11.3/8.11.3) with SMTP id fB3Fpbx78886; Mon, 3 Dec 2001 16:51:38 +0100 (CET) (envelope-from anthony@freebie.atkielski.com) Message-ID: <009101c17c12$649fe2e0$0a00000a@atkielski.com> From: "Anthony Atkielski" To: "George Reid" Cc: "FreeBSD Questions" References: <007a01c17c08$fd7f1030$0a00000a@atkielski.com> <20011203144722.A19484@FreeBSD.org> Subject: Re: Modifying only certain bits with chmod Date: Mon, 3 Dec 2001 16:50:24 +0100 Organization: Anthony's Home Page (development site) MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 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 I ended up modifying the command, which was easier (for me) than memorizing the symbolic syntax. Now I can type chmod 600:500 file to turn on the the r bit and turn off the x bit for the owner while leaving everything else alone. I find it easier to relate the bits in octal to the positions of the permission as output from ls than to try to remember letters and parameters. It's great to have source! So ... what's the safest way to make this my system-wide command without interfering with the standard chmod source and stuff? I guess I could just copy the modified binary over to bin, no? What do most people do when they develop their own local custom versions of a command? I'm tempted to modify my own man page to reflect the change, but looking at the chmod.1 file, it seems pretty scary. ----- Original Message ----- From: "George Reid" To: "Anthony Atkielski" Cc: "FreeBSD Questions" Sent: Monday, December 03, 2001 15:47 Subject: Re: Modifying only certain bits with chmod > On Mon, Dec 03, 2001 at 03:44:18PM +0100, Anthony Atkielski wrote: > > > 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? > > As chmod(1) says, modes are specified in symbolic or absolute (octal) > form. > > -- > George C A Reid Tel: (08701) 200870 Ext. 26654 > FreeBSD Committer/Developer greid@FreeBSD.org > Oriel College, Oxford University george.reid@oriel.ox.ac.uk > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message