Date: Mon, 3 Dec 2001 16:50:24 +0100 From: "Anthony Atkielski" <anthony@freebie.atkielski.com> To: "George Reid" <greid@freebsd.org> Cc: "FreeBSD Questions" <freebsd-questions@freebsd.org> Subject: Re: Modifying only certain bits with chmod Message-ID: <009101c17c12$649fe2e0$0a00000a@atkielski.com> References: <007a01c17c08$fd7f1030$0a00000a@atkielski.com> <20011203144722.A19484@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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" <greid@freebsd.org> To: "Anthony Atkielski" <anthony@freebie.atkielski.com> Cc: "FreeBSD Questions" <freebsd-questions@freebsd.org> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?009101c17c12$649fe2e0$0a00000a>